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, waitgetAnnotationsgetClassHierarchyprotected AstClass(CAstSourcePositionMap.Position sourcePosition, TypeName typeName, IClassLoader loader, short modifiers, Map<Atom,IField> declaredFields, Map<Selector,IMethod> declaredMethods)
public boolean isInterface()
IClassisInterface in interface IClasspublic boolean isAbstract()
isAbstract in interface IClasspublic boolean isPublic()
public boolean isPrivate()
public boolean isReferenceType()
IClassisReferenceType in interface IClasspublic boolean isArrayClass()
isArrayClass in interface IClasspublic int getModifiers()
IClassgetModifiers in interface IClasspublic CAstSourcePositionMap.Position getSourcePosition()
public URL getSourceURL()
public String getSourceFileName()
getSourceFileName in interface IClasspublic Reader getSource()
public TypeName getName()
public TypeReference getReference()
getReference in interface IClasspublic IClassLoader getClassLoader()
IClassgetClassLoader in interface IClasspublic abstract IClass getSuperclass()
getSuperclass in interface IClasspublic abstract Collection<IClass> getDirectInterfaces()
getDirectInterfaces in interface IClasspublic Collection<IClass> getAllImplementedInterfaces()
getAllImplementedInterfaces in interface IClasspublic IMethod getClassInitializer()
getClassInitializer in interface IClasspublic IMethod getMethod(Selector selector)
IClasspublic IField getField(Atom name, TypeName type)
IClassnull if not found.public Collection<IMethod> getDeclaredMethods()
getDeclaredMethods in interface IClasspublic Collection<IField> getDeclaredInstanceFields()
IClassgetDeclaredInstanceFields in interface IClasspublic Collection<IField> getDeclaredStaticFields()
getDeclaredStaticFields in interface IClasspublic Collection<IField> getAllInstanceFields()
IClassgetAllInstanceFields in interface IClasspublic Collection<IField> getAllStaticFields()
IClassgetAllStaticFields in interface IClasspublic Collection<IField> getAllFields()
IClassgetAllFields in interface IClasspublic Collection<IMethod> getAllMethods()
IClassgetAllMethods in interface IClass