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()
ClassInfo
public boolean isInterface()
ClassInfo
isInterface
in interface ClassInfo
public int modifiers()
ClassInfo
public String name()
ClassInfo
public String className()
ClassInfo
public String pkgName()
ClassInfo
public Type superType()
ClassInfo
public List<Type> impls()
ClassInfo
public Map<String,FieldInfo> fieldInfo()
ClassInfo
public FieldInfo findFieldInfo(String name)
ClassInfo
findFieldInfo
in interface ClassInfo
public Map<String,Set<MethodInfo>> methodInfoByName()
ClassInfo
methodInfoByName
in interface ClassInfo
public Set<MethodInfo> constructorInfo()
constructorInfo
in interface ClassInfo
public MethodInfo findMethodInfo(String name, Signature sig)
ClassInfo
findMethodInfo
in interface ClassInfo
public MethodInfo findConstructorInfo(Signature sig)
ClassInfo
findConstructorInfo
in interface ClassInfo
public boolean isSubclass(ClassInfo info)
ClassInfo
isSubclass
in interface ClassInfo
Copyright © 2017 Oracle. All rights reserved.