Package org.apache.openjpa.lib.meta
Class ClassMetaDataIterator
java.lang.Object
org.apache.openjpa.lib.meta.ClassMetaDataIterator
- All Implemented Interfaces:
MetaDataIterator
,Closeable
Iterator over all metadata resources that might contain the
metadata for a given class, starting with the most general. Assumes that
package-level resources are named "package.<suffix>".
- Author:
- Abe White
-
Constructor Summary
ConstructorDescriptionClassMetaDataIterator
(Class<?> cls, String suffix, boolean topDown) Constructor; supply the class whose metadata to find, the suffix of metadata files, and whether to parse top-down or bottom-up.ClassMetaDataIterator
(Class<?> cls, String suffix, ClassLoader loader, boolean topDown) Constructor; supply the class whose metadata to find, the suffix of metadata files, and whether to parse top-down or bottom-up. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the resources used by this iterator.getFile()
Return the last-iterated metadata resource content as a file, or null if not an extant file.Return the last-iterated metadata resource content as a stream.boolean
hasNext()
Return whether there is another resource to iterate over.next()
Return the next metadata resource.
-
Constructor Details
-
ClassMetaDataIterator
Constructor; supply the class whose metadata to find, the suffix of metadata files, and whether to parse top-down or bottom-up. -
ClassMetaDataIterator
Constructor; supply the class whose metadata to find, the suffix of metadata files, and whether to parse top-down or bottom-up.
-
-
Method Details
-
hasNext
Description copied from interface:MetaDataIterator
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
- Throws:
IOException
-
next
Description copied from interface:MetaDataIterator
Return the next metadata resource.- Specified by:
next
in interfaceMetaDataIterator
- Throws:
IOException
-
getInputStream
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a stream.- Specified by:
getInputStream
in interfaceMetaDataIterator
- Throws:
IOException
-
getFile
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
getFile
in interfaceMetaDataIterator
- Throws:
IOException
-
close
public void close()Description copied from interface:MetaDataIterator
Close the resources used by this iterator.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceMetaDataIterator
-