net.janino
Class Java.InterfaceDeclaration

java.lang.Object
  |
  +--net.janino.IClass
        |
        +--net.janino.Java.ClassOrInterfaceDeclaration
              |
              +--net.janino.Java.InterfaceDeclaration
All Implemented Interfaces:
Java.Locatable, Java.Scope
Enclosing class:
Java

public static class Java.InterfaceDeclaration
extends Java.ClassOrInterfaceDeclaration


Inner classes inherited from class net.janino.IClass
IClass.IConstructor, IClass.IField, IClass.IInvocable, IClass.IMember, IClass.IMethod
 
Fields inherited from class net.janino.Java.ClassOrInterfaceDeclaration
declaredClassesAndInterfaces, declaredMethods, modifiers, name
 
Fields inherited from class net.janino.IClass
PACKAGE, PRIVATE, PROTECTED, PUBLIC
 
Constructor Summary
Java.InterfaceDeclaration(Scanner.Location location, Java.Scope enclosingScope, short modifiers, java.lang.String name, Java.Type[] extendedTypes)
           
 
Method Summary
 void addConstantDeclaration(Java.FieldDeclarator fd)
           
 void compile(int debuggingInformation)
          Compile yourself.
 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[] 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 isFinal()
          Whether subclassing is allowed (JVMS 4.1 access_flags)
 boolean isInterface()
          Returns "true" if this type represents an interface.
 boolean isPublic()
          Whether the class may be accessed from outside its package (JVMS 4.1 access_flags)
 
Methods inherited from class net.janino.Java.ClassOrInterfaceDeclaration
addDeclaredMethod, compileError, getClassName, getComponentType, getDeclaredIClasses, getDeclaredIMethods, getDescriptor, getEnclosingScope, getLocation, isArray, isPrimitive, isPrimitiveNumeric, throwParseException, toString
 
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, wait, wait, wait
 

Constructor Detail

Java.InterfaceDeclaration

public Java.InterfaceDeclaration(Scanner.Location location,
                                 Java.Scope enclosingScope,
                                 short modifiers,
                                 java.lang.String name,
                                 Java.Type[] extendedTypes)
                          throws Parser.ParseException
Method Detail

addConstantDeclaration

public void addConstantDeclaration(Java.FieldDeclarator fd)

getSuperclass

public IClass getSuperclass()
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

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

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

isInterface

public boolean isInterface()
Description copied from class: IClass
Returns "true" if this type represents an interface.
Overrides:
isInterface 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

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

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

compile

public void compile(int debuggingInformation)
             throws Java.CompileException
Description copied from class: Java.ClassOrInterfaceDeclaration
Compile yourself. Results are stored in Java.generatedClassFiles.
Overrides:
compile in class Java.ClassOrInterfaceDeclaration
Following copied from class: net.janino.Java.ClassOrInterfaceDeclaration
Throws:
CompileException -