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 String
private Set
<MethodInfo> private boolean
private int
private boolean
private boolean
private Map
<String, Set<MethodInfo>> private int
private String
private Type
private Type
-
Constructor Summary
ConstructorsConstructorDescriptionClassInfoBase
(int modifiers, Type thisType) Construct a ClassInfoBase representing a class or interface. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConstructorInfo
(MethodInfo cinfo) protected void
addFieldInfo
(FieldInfo finfo) protected void
addMethodInfo
(MethodInfo minfo) private void
private void
Return the class name of the class represented by this ClassInfo relative to pkgName().private void
boolean
Return 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 MethodInfo
findMethodInfo
(Signature sig, Set<MethodInfo> minfos) int
hashCode()
impls()
Return the list of Types of interfaces implemented by this class.protected void
initializeClass
(Type thisType, Type superType, List<Type> impls) protected void
initializeInterface
(List<Type> exts) boolean
Return true iff this ClassInfo is an interface.boolean
isSubclass
(ClassInfo info) Return true iff this is a subclass or subinterface of info.Return methodInfo for all methods defined on this class.int
Return 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
Description copied from interface:ClassInfo
Return the Type of the class represented by this ClassInfo. -
isInterface
public boolean isInterface()Description copied from interface:ClassInfo
Return true iff this ClassInfo is an interface.- Specified by:
isInterface
in interfaceClassInfo
-
modifiers
public int modifiers()Description copied from interface:ClassInfo
Return the modifiers on this class as specified in java.lang.reflect.Modifier. -
name
Description copied from interface:ClassInfo
Return the fully qualified class name for this ClassInfo. -
className
Description copied from interface:ClassInfo
Return the class name of the class represented by this ClassInfo relative to pkgName(). -
pkgName
Description copied from interface:ClassInfo
Return the fully qualified package name containing the class represented by this ClassInfo. -
superType
Description copied from interface:ClassInfo
Return the Type of the supertype of this class. -
impls
Description copied from interface:ClassInfo
Return the list of Types of interfaces implemented by this class. May be empty, but never null. -
fieldInfo
Description copied from interface:ClassInfo
Return a map from field names to FieldInfo instances for every field defined in this class (not including super types). -
findFieldInfo
Description copied from interface:ClassInfo
Find a field with the given name if one exists. Searches this class and all super classes.- Specified by:
findFieldInfo
in interfaceClassInfo
-
methodInfoByName
Description copied from interface:ClassInfo
Return 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:
methodInfoByName
in interfaceClassInfo
-
constructorInfo
- Specified by:
constructorInfo
in interfaceClassInfo
-
findMethodInfo
-
findMethodInfo
Description copied from interface:ClassInfo
Find the method (if any) with the given name and Signature in this ClassInfo, or in any superType of this ClassInfo.- Specified by:
findMethodInfo
in interfaceClassInfo
-
findConstructorInfo
Description copied from interface:ClassInfo
Find the MethodInfo (if any) for a Constructor with the given Signature in this ClassInfo.- Specified by:
findConstructorInfo
in interfaceClassInfo
-
isSubclass
Description copied from interface:ClassInfo
Return true iff this is a subclass or subinterface of info.- Specified by:
isSubclass
in interfaceClassInfo
-
equals
-
toString
-
clearHashCode
private void clearHashCode() -
hashCode
public int hashCode()
-