public abstract class ClassInfoBase extends Object implements ClassInfo
| Constructor and Description |
|---|
ClassInfoBase(int modifiers,
Type thisType)
Construct a ClassInfoBase representing a class or interface.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConstructorInfo(MethodInfo cinfo) |
protected void |
addFieldInfo(FieldInfo finfo) |
protected void |
addMethodInfo(MethodInfo minfo) |
String |
className()
Return the class name of the class represented by this
ClassInfo relative to pkgName().
|
Set<MethodInfo> |
constructorInfo() |
boolean |
equals(Object obj) |
Map<String,FieldInfo> |
fieldInfo()
Return a map from field names to FieldInfo instances for
every field defined in this class (not including super types).
|
MethodInfo |
findConstructorInfo(Signature sig)
Find the MethodInfo (if any) for a Constructor with the given
Signature in this ClassInfo.
|
FieldInfo |
findFieldInfo(String name)
Find a field with the given name if one exists.
|
MethodInfo |
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.
|
int |
hashCode() |
List<Type> |
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 |
isInterface()
Return true iff this ClassInfo is an interface.
|
boolean |
isSubclass(ClassInfo info)
Return true iff this is a subclass or subinterface of
info.
|
Map<String,Set<MethodInfo>> |
methodInfoByName()
Return methodInfo for all methods defined on this class.
|
int |
modifiers()
Return the modifiers on this class as specified in java.lang.reflect.Modifier.
|
String |
name()
Return the fully qualified class name for this
ClassInfo.
|
String |
pkgName()
Return the fully qualified package name containing
the class represented by this ClassInfo.
|
Type |
superType()
Return the Type of the supertype of this class.
|
Type |
thisType()
Return the Type of the class represented by this
ClassInfo.
|
String |
toString() |
public ClassInfoBase(int modifiers,
Type thisType)
protected void addFieldInfo(FieldInfo finfo)
protected void addMethodInfo(MethodInfo minfo)
protected void addConstructorInfo(MethodInfo cinfo)
public Type thisType()
ClassInfopublic boolean isInterface()
ClassInfoisInterface in interface ClassInfopublic int modifiers()
ClassInfopublic String name()
ClassInfopublic String className()
ClassInfopublic String pkgName()
ClassInfopublic Type superType()
ClassInfopublic List<Type> impls()
ClassInfopublic Map<String,FieldInfo> fieldInfo()
ClassInfopublic FieldInfo findFieldInfo(String name)
ClassInfofindFieldInfo in interface ClassInfopublic Map<String,Set<MethodInfo>> methodInfoByName()
ClassInfomethodInfoByName in interface ClassInfopublic Set<MethodInfo> constructorInfo()
constructorInfo in interface ClassInfopublic MethodInfo findMethodInfo(String name, Signature sig)
ClassInfofindMethodInfo in interface ClassInfopublic MethodInfo findConstructorInfo(Signature sig)
ClassInfofindConstructorInfo in interface ClassInfopublic boolean isSubclass(ClassInfo info)
ClassInfoisSubclass in interface ClassInfoCopyright © 2017 Oracle. All rights reserved.