net.janino
Class ClassFileIClass

java.lang.Object
  |
  +--net.janino.IClass
        |
        +--net.janino.ClassFileIClass

public class ClassFileIClass
extends IClass

A wrapper object that turns a ClassFile object into a IClass.


Inner classes inherited from class net.janino.IClass
IClass.IConstructor, IClass.IField, IClass.IInvocable, IClass.IMember, IClass.IMethod
 
Fields inherited from class net.janino.IClass
PACKAGE, PRIVATE, PROTECTED, PUBLIC
 
Constructor Summary
ClassFileIClass(ClassFile classFile, IClassLoader iClassLoader)
           
 
Method Summary
 IClass getComponentType()
          Returns the component type of the array.
Returns "null" for classes, interfaces, primitive types and "void".
 IClass[] getDeclaredIClasses()
          Returns the classes and interfaces declared as members of the class (but not inherited classes and interfaces).
Returns an empty array for an array, primitive type or "void".
 IClass.IConstructor[] getDeclaredIConstructors()
          Returns all the constructors declared by the class represented by the type.
 IClass.IField[] getDeclaredIFields()
          Returns the fields of a class or interface (but not inherited fields).
Returns an empty array for an array, primitive type or "void".
 IClass.IMethod[] getDeclaredIMethods()
          Returns the methods of the class or interface (but not inherited methods).
Returns an empty array for an array, primitive type or "void".
 java.lang.String getDescriptor()
          Returns the field descriptor for the type as defined by JVMS 4.3.2.
 IClass[] getInterfaces()
          Returns the interfaces implemented by the class.
Returns the superinterfaces of the interface.
Returns "Cloneable" and "Serializable" for arrays.
Returns an empty array for primitive types and "void".
 IClass getSuperclass()
          Returns the superclass of the class.
Returns "null" for class "Object", interfaces, arrays, primitive types and "void".
 boolean isAbstract()
          Whether the class may be instantiated (JVMS 4.1 access_flags)
 boolean isArray()
          Returns "true" if this type represents an array.
 boolean isFinal()
          Whether subclassing is allowed (JVMS 4.1 access_flags)
 boolean isInterface()
          Returns "true" if this type represents an interface.
 boolean isPrimitive()
          Returns "true" if this type represents a primitive type or "void".
 boolean isPrimitiveNumeric()
          Returns "true" if this type represents "byte", "short", "int", "long", "char", "float" or "double".
 boolean isPublic()
          Whether the class may be accessed from outside its package (JVMS 4.1 access_flags)
 void resolveAllClasses()
           
 void resolveHalf()
           
 
Methods inherited from class net.janino.IClass
createArrayIClass, implementsInterface, isAssignableFrom, isSubclassOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileIClass

public ClassFileIClass(ClassFile classFile,
                       IClassLoader iClassLoader)
                throws java.lang.ClassNotFoundException
Parameters:
classFile - Source of data
iClassLoader - IClassLoader through which to load other classes
Throws:
java.lang.ClassNotFoundException - From iClassLoader.loadIClass()
Method Detail

getDeclaredIConstructors

public IClass.IConstructor[] getDeclaredIConstructors()
Description copied from class: IClass
Returns all the constructors declared by the class represented by the type. If the class has a default constructor, it is included.
Returns an empty array for an interface, array, primitive type or "void".
Overrides:
getDeclaredIConstructors in class IClass

getDeclaredIMethods

public IClass.IMethod[] getDeclaredIMethods()
Description copied from class: IClass
Returns the methods of the class or interface (but not inherited methods).
Returns an empty array for an array, primitive type or "void".
Overrides:
getDeclaredIMethods in class IClass

getDeclaredIFields

public IClass.IField[] getDeclaredIFields()
Description copied from class: IClass
Returns the fields of a class or interface (but not inherited fields).
Returns an empty array for an array, primitive type or "void".
Overrides:
getDeclaredIFields in class IClass

getDeclaredIClasses

public IClass[] getDeclaredIClasses()
Description copied from class: IClass
Returns the classes and interfaces declared as members of the class (but not inherited classes and interfaces).
Returns an empty array for an array, primitive type or "void".
Overrides:
getDeclaredIClasses in class IClass

getSuperclass

public IClass getSuperclass()
                     throws Java.CompileException
Description copied from class: IClass
Returns the superclass of the class.
Returns "null" for class "Object", interfaces, arrays, primitive types and "void".
Overrides:
getSuperclass in class IClass

isPublic

public boolean isPublic()
Description copied from class: IClass
Whether the class may be accessed from outside its package (JVMS 4.1 access_flags)
Overrides:
isPublic in class IClass

isFinal

public boolean isFinal()
Description copied from class: IClass
Whether subclassing is allowed (JVMS 4.1 access_flags)
Overrides:
isFinal in class IClass
Following copied from class: net.janino.IClass
Returns:
true if subclassing is prohibited

getInterfaces

public IClass[] getInterfaces()
                       throws Java.CompileException
Description copied from class: IClass
Returns the interfaces implemented by the class.
Returns the superinterfaces of the interface.
Returns "Cloneable" and "Serializable" for arrays.
Returns an empty array for primitive types and "void".
Overrides:
getInterfaces in class IClass

isAbstract

public boolean isAbstract()
Description copied from class: IClass
Whether the class may be instantiated (JVMS 4.1 access_flags)
Overrides:
isAbstract in class IClass
Following copied from class: net.janino.IClass
Returns:
true if instantiation is prohibited

getDescriptor

public java.lang.String getDescriptor()
Description copied from class: IClass
Returns the field descriptor for the type as defined by JVMS 4.3.2.
Overrides:
getDescriptor in class IClass

isInterface

public boolean isInterface()
Description copied from class: IClass
Returns "true" if this type represents an interface.
Overrides:
isInterface in class IClass

isArray

public boolean isArray()
Description copied from class: IClass
Returns "true" if this type represents an array.
Overrides:
isArray in class IClass

isPrimitive

public boolean isPrimitive()
Description copied from class: IClass
Returns "true" if this type represents a primitive type or "void".
Overrides:
isPrimitive in class IClass

isPrimitiveNumeric

public boolean isPrimitiveNumeric()
Description copied from class: IClass
Returns "true" if this type represents "byte", "short", "int", "long", "char", "float" or "double".
Overrides:
isPrimitiveNumeric in class IClass

getComponentType

public IClass getComponentType()
Description copied from class: IClass
Returns the component type of the array.
Returns "null" for classes, interfaces, primitive types and "void".
Overrides:
getComponentType in class IClass

resolveHalf

public void resolveHalf()
                 throws java.lang.ClassNotFoundException

resolveAllClasses

public void resolveAllClasses()
                       throws java.lang.ClassNotFoundException