public abstract class ClassInfoBase extends java.lang.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) |
java.lang.String |
className()
Return the class name of the class represented by this
ClassInfo relative to pkgName().
|
java.util.Set<MethodInfo> |
constructorInfo() |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.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(java.lang.String name)
Find a field with the given name if one exists.
|
MethodInfo |
findMethodInfo(java.lang.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() |
java.util.List<Type> |
impls()
Return the list of Types of interfaces implemented by this class.
|
protected void |
initializeClass(Type thisType,
Type superType,
java.util.List<Type> impls) |
protected void |
initializeInterface(java.util.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.
|
java.util.Map<java.lang.String,java.util.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.
|
java.lang.String |
name()
Return the fully qualified class name for this
ClassInfo.
|
java.lang.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.
|
java.lang.String |
toString() |
public ClassInfoBase(int modifiers,
Type thisType)
protected void initializeInterface(java.util.List<Type> exts)
protected void initializeClass(Type thisType, Type superType, java.util.List<Type> impls)
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 java.lang.String name()
ClassInfopublic java.lang.String className()
ClassInfopublic java.lang.String pkgName()
ClassInfopublic Type superType()
ClassInfopublic java.util.List<Type> impls()
ClassInfopublic java.util.Map<java.lang.String,FieldInfo> fieldInfo()
ClassInfopublic FieldInfo findFieldInfo(java.lang.String name)
ClassInfofindFieldInfo in interface ClassInfopublic java.util.Map<java.lang.String,java.util.Set<MethodInfo>> methodInfoByName()
ClassInfomethodInfoByName in interface ClassInfopublic java.util.Set<MethodInfo> constructorInfo()
constructorInfo in interface ClassInfopublic MethodInfo findMethodInfo(java.lang.String name, Signature sig)
ClassInfofindMethodInfo in interface ClassInfopublic MethodInfo findConstructorInfo(Signature sig)
ClassInfofindConstructorInfo in interface ClassInfopublic boolean isSubclass(ClassInfo info)
ClassInfoisSubclass in interface ClassInfopublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object