public interface IClass extends IClassHierarchyDweller
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.
|
Collection<Annotation> |
getAnnotations()
get annotations, if any
|
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() |
Collection<? extends 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() |
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.
|
getClassHierarchy
IClassLoader getClassLoader()
boolean isInterface()
boolean isAbstract()
boolean isPublic()
boolean isPrivate()
int getModifiers() throws UnsupportedOperationException
UnsupportedOperationException
IClass getSuperclass()
IllegalStateException
- if there's some problem determining the superclassCollection<? extends IClass> getDirectInterfaces()
Collection<IClass> getAllImplementedInterfaces()
IMethod getMethod(Selector selector)
selector
- a method signatureIField getField(Atom name)
IllegalStateException
- if the class contains multiple fields with name name
.IField getField(Atom name, TypeName type)
null
if not found.TypeReference getReference()
String getSourceFileName() throws NoSuchElementException
NoSuchElementException
- if this class was generated from more than one source file
The assumption that a class is generated from a single source file is java
specific, and will change in the future. In place of this API, use the APIs in IClassLoader.
SJF .. we should think about this deprecation. postponing deprecation for now.Reader getSource() throws NoSuchElementException
NoSuchElementException
- if this class was generated from more than one source file
The assumption that a class is generated from a single source file is java
specific, and will change in the future. In place of this API, use the APIs in IClassLoader.
SJF .. we should think about this deprecation. postponing deprecation for now.IMethod getClassInitializer()
boolean isArrayClass()
Collection<IMethod> getDeclaredMethods()
Collection<IField> getAllInstanceFields()
Collection<IField> getAllStaticFields()
Collection<IField> getAllFields()
Collection<IMethod> getAllMethods()
Collection<IField> getDeclaredInstanceFields()
Collection<IField> getDeclaredStaticFields()
TypeName getName()
boolean isReferenceType()
Collection<Annotation> getAnnotations()