DotName values.
It contains the following information:
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Map | |
| pack-priv final Map | |
| pack-priv volatile Map | |
| private static final List | |
| private static final List | |
| pack-priv final Map | |
| pack-priv final Map | |
| pack-priv static final DotName | |
| pack-priv final Map | |
| pack-priv final Map | |
| pack-priv volatile Map | |
| pack-priv final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static Index | Returns: the indexA map to lookup annotation instances by class name annotations, Map<DotName, List<ClassInfo>> A map to lookup subclasses by super class name subclasses, Map<DotName, List<ClassInfo>> A map to lookup implementing classes by interface name implementors, Map<DotName, ClassInfo> A map to lookup classes by class name classes)Constructs a "mock" Index using the passed values. |
| public static Index | Returns: the indexA map to lookup annotation instances by class name annotations, Map<DotName, List<ClassInfo>> A map to lookup subclasses by super class name subclasses, Map<DotName, List<ClassInfo>> A map to lookup implementing classes by interface name implementors, Map<DotName, ClassInfo> A map to lookup classes by class name classes, Map<DotName, List<ClassInfo>> A map to lookup class users users)Constructs a "mock" Index using the passed values. |
| public static Index | Returns: the indexA map to lookup annotation instances by class name annotations, Map<DotName, List<ClassInfo>> A map to lookup subclasses by super class name subclasses, Map<DotName, List<ClassInfo>> A map to lookup subinterfaces by super interface name subinterfaces, Map<DotName, List<ClassInfo>> A map to lookup implementing classes by interface name implementors, Map<DotName, ClassInfo> A map to lookup classes by class name classes, Map<DotName, List<ClassInfo>> A map to lookup class users users)Constructs a "mock" Index using the passed values. |
| public Set | getAllKnownImplementors(final DotName
The interface interfaceName)Implements org. |
| public Collection | getAllKnownSubclasses(DotName
The class className)Implements org. |
| private void | |
| private void | |
| public Collection | getAllKnownSubinterfaces(DotName
The interace interfaceName)Implements org. |
| public List | getAnnotations(DotName
the name of the annotation to look for annotationName)Implements org. |
| public Collection | getAnnotationsWithRepeatable(DotName
the name of the repeatable annotation annotationName, IndexView the index containing the annotation class index)Implements org. |
| public ClassInfo | getClassByName(DotName
the name of the class className)Implements org. |
| public Collection | getClassesInPackage(DotName
package name in the common, dot-separated form (e.g. packageName)com.example.foobar);
null means the unnamed packageImplements org. |
| public Collection | getKnownClasses()
Implements org. |
| public List | getKnownDirectImplementors(DotName
the super class of the desired subclasses className)Implements org. |
| public List | getKnownDirectSubclasses(DotName
the super class of the desired subclasses className)Implements org. |
| public List | getKnownDirectSubinterfaces(DotName
the super interface of the desired subinterfaces interfaceName)Implements org. |
| private void | |
| public Collection | getKnownModules()
Implements org. |
| public List | getKnownUsers(DotName
the name of the class to look for className)Implements org. |
| public ModuleInfo | getModuleByName(DotName
the name of the module moduleName)Implements org. |
| private Collection | |
| public Set | getSubpackages(DotName
package name in the common, dot-separated form (e.g. packageName)com.example.foobar);
null means the unnamed packageImplements org. |
| public static Index | |
| public static Index | |
| public static Index | |
| public void | |
| public void | |
| public static ClassInfo | Returns: the correspondingClassInfothe class to index, must not be clazz)nullCreates a temporary |
| public static ClassInfo | Returns: the correspondingClassInfothe class bytecode to index, must not be classData)nullCreates a temporary |
| public static ClassInfo | Returns: the correspondingClassInfothe class bytecode to index, must not be classData)nullCreates a temporary |
| annotations | back to summary |
|---|---|
| pack-priv final Map<DotName, List<AnnotationInstance>> annotations | |
| classes | back to summary |
|---|---|
| pack-priv final Map<DotName, ClassInfo> classes | |
| classesInPackage | back to summary |
|---|---|
| pack-priv volatile Map<DotName, Collection<ClassInfo>> classesInPackage | |
| EMPTY_ANNOTATION_LIST | back to summary |
|---|---|
| private static final List<AnnotationInstance> EMPTY_ANNOTATION_LIST | |
| EMPTY_CLASSINFO_LIST | back to summary |
|---|---|
| private static final List<ClassInfo> EMPTY_CLASSINFO_LIST | |
| implementors | back to summary |
|---|---|
| pack-priv final Map<DotName, List<ClassInfo>> implementors | |
| modules | back to summary |
|---|---|
| pack-priv final Map<DotName, ModuleInfo> modules | |
| REPEATABLE | back to summary |
|---|---|
| pack-priv static final DotName REPEATABLE | |
| subclasses | back to summary |
|---|---|
| pack-priv final Map<DotName, List<ClassInfo>> subclasses | |
| subinterfaces | back to summary |
|---|---|
| pack-priv final Map<DotName, List<ClassInfo>> subinterfaces | |
| subpackages | back to summary |
|---|---|
| pack-priv volatile Map<DotName, Set<DotName>> subpackages | |
| users | back to summary |
|---|---|
| pack-priv final Map<DotName, List<ClassInfo>> users | |
| Index | back to summary |
|---|---|
| pack-priv Index(Map<DotName, List<AnnotationInstance>> annotations, Map<DotName, List<ClassInfo>> subclasses, Map<DotName, List<ClassInfo>> subinterfaces, Map<DotName, List<ClassInfo>> implementors, Map<DotName, ClassInfo> classes, Map<DotName, ModuleInfo> modules, Map<DotName, List<ClassInfo>> users) | |
| create | back to summary |
|---|---|
| public static Index create(Map<DotName, List<AnnotationInstance>> annotations, Map<DotName, List<ClassInfo>> subclasses, Map<DotName, List<ClassInfo>> implementors, Map<DotName, ClassInfo> classes) Constructs a "mock" Index using the passed values. All passed values MUST NOT BE MODIFIED AFTER THIS CALL. Otherwise the resulting object would not conform to the contract outlined above. Also, to conform to the memory efficiency contract this method should be passed componentized DotNames, which all share common root instances. Of course for testing code this doesn't really matter.
| |
| create | back to summary |
|---|---|
| public static Index create(Map<DotName, List<AnnotationInstance>> annotations, Map<DotName, List<ClassInfo>> subclasses, Map<DotName, List<ClassInfo>> implementors, Map<DotName, ClassInfo> classes, Map<DotName, List<ClassInfo>> users) Constructs a "mock" Index using the passed values. All passed values MUST NOT BE MODIFIED AFTER THIS CALL. Otherwise the resulting object would not conform to the contract outlined above. Also, to conform to the memory efficiency contract this method should be passed componentized DotNames, which all share common root instances. Of course for testing code this doesn't really matter.
| |
| create | back to summary |
|---|---|
| public static Index create(Map<DotName, List<AnnotationInstance>> annotations, Map<DotName, List<ClassInfo>> subclasses, Map<DotName, List<ClassInfo>> subinterfaces, Map<DotName, List<ClassInfo>> implementors, Map<DotName, ClassInfo> classes, Map<DotName, List<ClassInfo>> users) Constructs a "mock" Index using the passed values. All passed values MUST NOT BE MODIFIED AFTER THIS CALL. Otherwise the resulting object would not conform to the contract outlined above. Also, to conform to the memory efficiency contract this method should be passed componentized DotNames, which all share common root instances. Of course for testing code this doesn't really matter.
| |
| getAllKnownImplementors | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns all known classes that implement the given interface, directly and indirectly. This will return all classes that implement the interface and its subinterfaces, as well as subclasses of classes that implement the interface and its subinterfaces. (In short, it will return every class in the index that is assignable to the interface.)
Note that this method only returns classes. Unlike | |
| getAllKnownSubclasses | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns all known (including non-direct) subclasses of the given class. I.e., returns all known classes that are assignable to the given class.
| |
| getAllKnownSubClasses | back to summary |
|---|---|
| private void getAllKnownSubClasses(DotName className, Set<ClassInfo> allKnown, Set<DotName> processedClasses) | |
| getAllKnownSubClasses | back to summary |
|---|---|
| private void getAllKnownSubClasses(DotName name, Set<ClassInfo> allKnown, Set<DotName> subClassesToProcess, Set<DotName> processedClasses) | |
| getAllKnownSubinterfaces | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns all known interfaces that extend the given interface, directly and indirectly. I.e., returns every interface in the index that is assignable to the given interface.
| |
| getAnnotations | back to summary |
|---|---|
| public List Implements org. Doc from org. Obtains a list of instances for the specified annotation. This is done using an O(1) lookup. Valid instance targets include field, method, parameter, and class.
| |
| getAnnotationsWithRepeatable | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Obtains a list of instances for the specified annotation. If the specified annotation is repeatable (JLS 9.6), the result
also contains all values from all instances of the container annotation. In this case, the
| |
| getClassByName | back to summary |
|---|---|
| public ClassInfo getClassByName(DotName className) Implements org. Doc from org. Gets the class (or interface, or annotation) that was scanned during the indexing phase. | |
| getClassesInPackage | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns all classes known to this index that are present in given package.
Classes present in subpackages of given package are not returned. Classes present in the unnamed
package may be looked up using
In the default
| |
| getKnownClasses | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known classes by this index (those which were scanned).
| |
| getKnownDirectImplementors | back to summary |
|---|---|
| public List Implements org. Doc from org. Gets all known direct implementors of the specified interface. A known direct implementor is one which was found during the scanning process; however, this is often not the complete universe of implementors, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server).
The list of implementors also includes direct subinterfaces. This is inconsistent
with Note that this will only pick up classes that directly implement given interface. It will not pick up classes implementing subinterfaces. | |
| getKnownDirectSubclasses | back to summary |
|---|---|
| public List Implements org. Doc from org. Gets all known direct subclasses of the specified class. A known direct subclass is one which was found during the scanning process; however, this is often not the complete universe of subclasses, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server). Note that this will only pick up direct subclasses of the class. It will not pick up subclasses of subclasses. | |
| getKnownDirectSubinterfaces | back to summary |
|---|---|
| public List Implements org. Doc from org. Gets all known direct subinterfaces of the specified interface. A known direct subinterface is one which was found during the scanning process; however, this is often not the complete universe of subinterfaces, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server). Note that this will only pick up direct subinterfaces of the interface. It will not pick up subinterfaces of subinterfaces. | |
| getKnownImplementors | back to summary |
|---|---|
| private void getKnownImplementors(DotName name, Set<ClassInfo> allKnown, Set<DotName> subInterfacesToProcess, Set<DotName> processedClasses) | |
| getKnownModules | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known modules by this index (those which were scanned).
| |
| getKnownUsers | back to summary |
|---|---|
| public List Implements org. Doc from org. Obtains a list of classes that use the specified class. In other words, a list of classes that include a reference to the specified class in their constant pool. | |
| getModuleByName | back to summary |
|---|---|
| public ModuleInfo getModuleByName(DotName moduleName) Implements org. Doc from org. Gets the module that was scanned during the indexing phase.
| |
| getRepeatableAnnotations | back to summary |
|---|---|
| private Collection | |
| getSubpackages | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns a set of packages known to this index that are direct subpackages of given package. Indirect subpackages of given package (subpackages of subpackages) are not returned. If this index does not contain any class in a direct or indirect subpackage of given package, returns an empty collection.
Given that the unnamed package may not contain subpackages, passing
In the default | |
| of | back to summary |
|---|---|
| public static Index of(Iterable<Class<?>> classes) throws IOException Constructs an Index of the passed classes. | |
| of | back to summary |
|---|---|
| public static Index of(Class<?>... classes) throws IOException Constructs an Index of the passed classes. | |
| of | back to summary |
|---|---|
| public static Index of(File... files) throws IOException Constructs an Index of the passed files and directories. Files may be class files or JAR files. Directories are scanned for class files, but not recursively.
| |
| printAnnotations | back to summary |
|---|---|
| public void printAnnotations() Print all annotations known by this index to stdout. | |
| printSubclasses | back to summary |
|---|---|
| public void printSubclasses() Print all classes that have known subclasses, and all their subclasses | |
| singleClass | back to summary |
|---|---|
| public static ClassInfo singleClass(Class<?> clazz) throws IOException Creates a temporary | |
| singleClass | back to summary |
|---|---|
| public static ClassInfo singleClass(byte[] classData) throws IOException Creates a temporary | |
| singleClass | back to summary |
|---|---|
| public static ClassInfo singleClass(InputStream classData) throws IOException Creates a temporary
| |