Interface ClassEntry
- All Superinterfaces:
AccessedEntry,DescribableEntry
- All Known Implementing Classes:
BasicClassEntry,ReflectiveClassEntry,StaticFilteredClassEntry
Metadata model of a class type.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stream<MemberEntry> default booleandefault ClassEntrygetCommonParent(ClassEntry other) default FieldEntrygetDeclaredField(String name, String desc) default FieldEntrygetDeclaredField(String name, String desc, Predicate<FieldEntry> filter) default List<FieldEntry> default MethodEntrygetDeclaredMethod(String name, String desc) default MethodEntrygetDeclaredMethod(String name, String desc, Predicate<MethodEntry> filter) default List<MethodEntry> default Stringdefault FieldEntrydefault FieldEntrygetField(String name, String desc, Predicate<FieldEntry> filter) default MethodEntrydefault MethodEntrygetMethod(String name, String desc, Predicate<MethodEntry> filter) getName()default Stringdefault booleanisAssignableFrom(ClassEntry child) default booleanisAssignableFrom(DescribableEntry other) Check if another entry is assignable to the type represented by this entry.default booleandefault voidvisitHierarchy(Consumer<ClassEntry> consumer) Visits the current class, and all parent classes (extended or implemented).Methods inherited from interface software.coley.sourcesolver.resolve.entry.AccessedEntry
getAccess, isPackageProtected, isPrivate, isProtected, isPublic, isStaticMethods inherited from interface software.coley.sourcesolver.resolve.entry.DescribableEntry
toArrayEntry
-
Method Details
-
getSuperEntry
- Returns:
- Metadata model of the super-type, if available.
-
getImplementedEntries
- Returns:
- Metadata models of all implemented interface types.
-
getInnerClassEntries
- Returns:
- Metadata models of all inner class declarations.
-
getName
- Returns:
- Name of class in internal format.
-
getPackageName
- Returns:
- Name of the package in internal format that this class resides in.
nullfor classes in the default package.
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribableEntry- Returns:
- Type descriptor of this entry.
-
isInterface
default boolean isInterface() -
getDeclaredFields
- Returns:
- Metadata models of all declared fields.
-
getDeclaredMethods
- Returns:
- Metadata models of all declared methods.
-
declaredMemberStream
- Returns:
- Stream of all metadata models for declared fields and methods.
-
getField
- Parameters:
name- Field name.desc- Field descriptor.- Returns:
- Metadata model of the field, or
nullif no such field exists in this class or any parent class.
-
getField
@Nullable default FieldEntry getField(@Nonnull String name, @Nonnull String desc, @Nullable Predicate<FieldEntry> filter) - Parameters:
name- Field name.desc- Field descriptor.filter- Optional filter to limit matches.- Returns:
- Metadata model of the field, or
nullif no such field exists in this class or any parent class.
-
getDeclaredField
- Parameters:
name- Field name.desc- Field descriptor.- Returns:
- Metadata model of the declared field, or
nullif no such field exists in this class.
-
getDeclaredField
@Nullable default FieldEntry getDeclaredField(@Nonnull String name, @Nonnull String desc, @Nullable Predicate<FieldEntry> filter) - Parameters:
name- Field name.desc- Field descriptor.filter- Optional filter to limit matches.- Returns:
- Metadata model of the declared field, or
nullif no such field exists in this class.
-
getDeclaredFieldsByName
- Parameters:
name- Field name.- Returns:
- All declared fields with the given name.
-
getMethod
- Parameters:
name- Method name.desc- Method descriptor.- Returns:
- Metadata model of the declared method, or
nullif no such method exists in this class or any parent class.
-
getMethod
@Nullable default MethodEntry getMethod(@Nonnull String name, @Nonnull String desc, @Nullable Predicate<MethodEntry> filter) - Parameters:
name- Method name.desc- Method descriptor.filter- Optional filter to limit matches.- Returns:
- Metadata model of the method, or
nullif no such method exists in this class or any parent class.
-
getDeclaredMethod
- Parameters:
name- Method name.desc- Method descriptor.- Returns:
- Metadata model of the declared method, or
nullif no such method exists in this class.
-
getDeclaredMethod
@Nullable default MethodEntry getDeclaredMethod(@Nonnull String name, @Nonnull String desc, @Nullable Predicate<MethodEntry> filter) - Parameters:
name- Method name.desc- Method descriptor.filter- Optional filter to limit matches.- Returns:
- Metadata model of the declared method, or
nullif no such method exists in this class.
-
getDeclaredMethodsByName
- Parameters:
name- Method name.- Returns:
- All declared methods with the given name.
-
visitHierarchy
Visits the current class, and all parent classes (extended or implemented).- Parameters:
consumer- Consumer to visit each class.
-
extendsOrImplementsName
- Parameters:
name- Class name.- Returns:
trueif this class extends or implements the requested class.
-
isAssignableFrom
Description copied from interface:DescribableEntryCheck if another entry is assignable to the type represented by this entry.- Specified by:
isAssignableFromin interfaceDescribableEntry- Parameters:
other- Some other entry.- Returns:
truewhen the other entry is assignable to the type represented by this entry.
-
isAssignableFrom
-
getCommonParent
- Parameters:
other- Some other class entry.- Returns:
- Common parent type shared between the two.
-