Class ClassInfoBase
java.lang.Object
org.glassfish.pfl.dynamic.codegen.impl.ClassInfoBase
- All Implemented Interfaces:
ClassInfo
- Direct Known Subclasses:
ClassGeneratorImpl, ClassInfoReflectiveImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Set<MethodInfo> private booleanprivate intprivate booleanprivate booleanprivate Map<String, Set<MethodInfo>> private intprivate Stringprivate Typeprivate Type -
Constructor Summary
ConstructorsConstructorDescriptionClassInfoBase(int modifiers, Type thisType) Construct a ClassInfoBase representing a class or interface. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConstructorInfo(MethodInfo cinfo) protected voidaddFieldInfo(FieldInfo finfo) protected voidaddMethodInfo(MethodInfo minfo) private voidprivate voidReturn the class name of the class represented by this ClassInfo relative to pkgName().private voidbooleanReturn a map from field names to FieldInfo instances for every field defined in this class (not including super types).Find the MethodInfo (if any) for a Constructor with the given Signature in this ClassInfo.findFieldInfo(String name) Find a field with the given name if one exists.findMethodInfo(String name, Signature sig) Find the method (if any) with the given name and Signature in this ClassInfo, or in any superType of this ClassInfo.private MethodInfofindMethodInfo(Signature sig, Set<MethodInfo> minfos) inthashCode()impls()Return the list of Types of interfaces implemented by this class.protected voidinitializeClass(Type thisType, Type superType, List<Type> impls) protected voidinitializeInterface(List<Type> exts) booleanReturn true iff this ClassInfo is an interface.booleanisSubclass(ClassInfo info) Return true iff this is a subclass or subinterface of info.Map<String, Set<MethodInfo>> Return methodInfo for all methods defined on this class.intReturn the modifiers on this class as specified in java.lang.reflect.Modifier.name()Return the fully qualified class name for this ClassInfo.pkgName()Return the fully qualified package name containing the class represented by this ClassInfo.Return the Type of the supertype of this class.thisType()Return the Type of the class represented by this ClassInfo.toString()
-
Field Details
-
modifiers
private int modifiers -
thisType
-
className
-
pkgName
-
initComplete
private boolean initComplete -
isInterface
private boolean isInterface -
superType
-
impls
-
methodInfoByName
-
constructors
-
fields
-
hashIsCached
private boolean hashIsCached -
hashValue
private int hashValue
-
-
Constructor Details
-
ClassInfoBase
Construct a ClassInfoBase representing a class or interface.
-
-
Method Details
-
checkComplete
private void checkComplete() -
checkReinitialize
private void checkReinitialize() -
initializeInterface
-
initializeClass
-
addFieldInfo
-
addMethodInfo
-
addConstructorInfo
-
thisType
-
isInterface
public boolean isInterface()Description copied from interface:ClassInfoReturn true iff this ClassInfo is an interface.- Specified by:
isInterfacein interfaceClassInfo
-
modifiers
-
name
-
className
-
pkgName
-
superType
-
impls
-
fieldInfo
-
findFieldInfo
Description copied from interface:ClassInfoFind a field with the given name if one exists. Searches this class and all super classes.- Specified by:
findFieldInfoin interfaceClassInfo
-
methodInfoByName
Description copied from interface:ClassInfoReturn methodInfo for all methods defined on this class. This does not include inherited methods. Here we return a map from method name to the set of MethodInfo instances for all methods with the same method name. This form is useful for handling method overload resolution.- Specified by:
methodInfoByNamein interfaceClassInfo
-
constructorInfo
- Specified by:
constructorInfoin interfaceClassInfo
-
findMethodInfo
-
findMethodInfo
Description copied from interface:ClassInfoFind the method (if any) with the given name and Signature in this ClassInfo, or in any superType of this ClassInfo.- Specified by:
findMethodInfoin interfaceClassInfo
-
findConstructorInfo
Description copied from interface:ClassInfoFind the MethodInfo (if any) for a Constructor with the given Signature in this ClassInfo.- Specified by:
findConstructorInfoin interfaceClassInfo
-
isSubclass
Description copied from interface:ClassInfoReturn true iff this is a subclass or subinterface of info.- Specified by:
isSubclassin interfaceClassInfo
-
equals
-
toString
-
clearHashCode
private void clearHashCode() -
hashCode
-