public abstract class AstClass extends Object implements IClass, ClassConstants
Modifier and Type | Field and Description |
---|---|
protected Map<Atom,IField> |
declaredFields |
protected Map<Selector,IMethod> |
declaredMethods |
ACC_ABSTRACT, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_TRANSIENT, ACC_VOLATILE, CONSTANT_Class, CONSTANT_Double, CONSTANT_FieldRef, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodRef, CONSTANT_InvokeDynamic, CONSTANT_Long, CONSTANT_MethodHandle, CONSTANT_MethodRef, CONSTANT_MethodType, CONSTANT_NameAndType, CONSTANT_String, CONSTANT_Utf8, MAGIC, REF_getField, REF_getStatic, REF_invokeInterface, REF_invokeSpecial, REF_invokeStatic, REF_invokeVirtual, REF_newInvokeSpecial, REF_putField, REF_putStatic
Modifier | Constructor and Description |
---|---|
protected |
AstClass(CAstSourcePositionMap.Position sourcePosition,
TypeName typeName,
IClassLoader loader,
short modifiers,
Map<Atom,IField> declaredFields,
Map<Selector,IMethod> declaredMethods) |
Modifier and Type | Method and Description |
---|---|
Collection<IField> |
getAllFields()
Compute the instance and static fields declared by this class or any of its superclasses.
|
Collection<IClass> |
getAllImplementedInterfaces() |
Collection<IField> |
getAllInstanceFields()
Compute the instance fields declared by this class or any of its superclasses.
|
Collection<IMethod> |
getAllMethods()
Compute the methods declared by this class or any of its superclasses.
|
Collection<IField> |
getAllStaticFields()
Compute the static fields declared by this class or any of its superclasses.
|
IMethod |
getClassInitializer() |
IClassLoader |
getClassLoader()
Return the object that represents the defining class loader for this class.
|
Collection<IField> |
getDeclaredInstanceFields()
Compute the instance fields declared by this class.
|
Collection<IMethod> |
getDeclaredMethods() |
Collection<IField> |
getDeclaredStaticFields() |
abstract Collection<IClass> |
getDirectInterfaces() |
IField |
getField(Atom name)
Finds a field.
|
IField |
getField(Atom name,
TypeName type)
Finds a field, given a name and a type.
|
IMethod |
getMethod(Selector selector)
Finds method matching signature.
|
int |
getModifiers()
Return the integer that encodes the class's modifiers, as defined by the JVM specification
|
TypeName |
getName() |
TypeReference |
getReference() |
Reader |
getSource() |
String |
getSourceFileName() |
CAstSourcePositionMap.Position |
getSourcePosition() |
URL |
getSourceURL() |
abstract IClass |
getSuperclass() |
boolean |
isAbstract() |
boolean |
isArrayClass() |
boolean |
isInterface()
Is this class a Java interface?
|
boolean |
isPrivate() |
boolean |
isPublic() |
boolean |
isReferenceType()
Does 'this' refer to a reference type? If not, then it refers to a primitive type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotations
getClassHierarchy
protected AstClass(CAstSourcePositionMap.Position sourcePosition, TypeName typeName, IClassLoader loader, short modifiers, Map<Atom,IField> declaredFields, Map<Selector,IMethod> declaredMethods)
public boolean isInterface()
IClass
isInterface
in interface IClass
public boolean isAbstract()
isAbstract
in interface IClass
public boolean isPublic()
public boolean isPrivate()
public boolean isReferenceType()
IClass
isReferenceType
in interface IClass
public boolean isArrayClass()
isArrayClass
in interface IClass
public int getModifiers()
IClass
getModifiers
in interface IClass
public CAstSourcePositionMap.Position getSourcePosition()
public URL getSourceURL()
public String getSourceFileName()
getSourceFileName
in interface IClass
public Reader getSource()
public TypeName getName()
public TypeReference getReference()
getReference
in interface IClass
public IClassLoader getClassLoader()
IClass
getClassLoader
in interface IClass
public abstract IClass getSuperclass()
getSuperclass
in interface IClass
public abstract Collection<IClass> getDirectInterfaces()
getDirectInterfaces
in interface IClass
public Collection<IClass> getAllImplementedInterfaces()
getAllImplementedInterfaces
in interface IClass
public IMethod getClassInitializer()
getClassInitializer
in interface IClass
public IMethod getMethod(Selector selector)
IClass
public IField getField(Atom name, TypeName type)
IClass
null
if not found.public Collection<IMethod> getDeclaredMethods()
getDeclaredMethods
in interface IClass
public Collection<IField> getDeclaredInstanceFields()
IClass
getDeclaredInstanceFields
in interface IClass
public Collection<IField> getDeclaredStaticFields()
getDeclaredStaticFields
in interface IClass
public Collection<IField> getAllInstanceFields()
IClass
getAllInstanceFields
in interface IClass
public Collection<IField> getAllStaticFields()
IClass
getAllStaticFields
in interface IClass
public Collection<IField> getAllFields()
IClass
getAllFields
in interface IClass
public Collection<IMethod> getAllMethods()
IClass
getAllMethods
in interface IClass