janino.net

org.codehaus.janino
Interface Java.TypeDeclaration

All Superinterfaces:
Java.Locatable, Java.Scope
All Known Subinterfaces:
Java.MemberTypeDeclaration, Java.NamedTypeDeclaration, Java.PackageMemberTypeDeclaration
All Known Implementing Classes:
Java.AbstractTypeDeclaration, Java.AnonymousClassDeclaration, Java.ClassDeclaration, Java.InterfaceDeclaration, Java.LocalClassDeclaration, Java.MemberClassDeclaration, Java.MemberInterfaceDeclaration, Java.NamedClassDeclaration, Java.PackageMemberClassDeclaration, Java.PackageMemberInterfaceDeclaration
Enclosing class:
Java

public static interface Java.TypeDeclaration
extends Java.Locatable, Java.Scope

Base for the various kinds of type declarations, e.g. top-level class, member interface, local class.


Method Summary
 void accept(Visitor.TypeDeclarationVisitor visitor)
          Invokes the 'visit...()' method of Visitor.TypeDeclarationVisitor for the concrete Java.TypeDeclaration type.
  createAnonymousClassName()
          Creates a unique name for an anonymous class.
  createLocalTypeName( localTypeName)
          Creates a unique name for a local class or interface.
 Java.Annotation[] getAnnotations()
           
  getClassName()
          Determines the effective class name, e.g.
 Java.MemberTypeDeclaration getMemberTypeDeclaration( name)
          Return the member type with the given name.
 <Java.MemberTypeDeclaration> getMemberTypeDeclarations()
           
 Java.MethodDeclarator getMethodDeclaration( name)
          Return the first method declared with the given name.
 <Java.MethodDeclarator> getMethodDeclarations()
           
 short getModifierFlags()
           
 
Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
 
Methods inherited from interface org.codehaus.janino.Java.Scope
getEnclosingScope
 

Method Detail

getModifierFlags

short getModifierFlags()
Returns:
The or'ed modifier flags of the type, as defined in Mod

getAnnotations

Java.Annotation[] getAnnotations()
Returns:
The annotations of this Java.TypeDeclaration

getMemberTypeDeclaration

Java.MemberTypeDeclaration getMemberTypeDeclaration( name)
Return the member type with the given name.

Returns:
null if a member type with that name is not declared

getMemberTypeDeclarations

<Java.MemberTypeDeclaration> getMemberTypeDeclarations()
Returns:
The (possibly empty) set of member types declared inside this Java.TypeDeclaration

getMethodDeclaration

Java.MethodDeclarator getMethodDeclaration( name)
Return the first method declared with the given name. (Does not honor inherited methods.)

Returns:
null if a method with this name is not declared

getMethodDeclarations

<Java.MethodDeclarator> getMethodDeclarations()
Returns:
The list of methods declared in this Java.TypeDeclaration, not including methods declared in supertypes

getClassName

 getClassName()
Determines the effective class name, e.g. "pkg.Outer$Inner".


createLocalTypeName

 createLocalTypeName( localTypeName)
Creates a unique name for a local class or interface.


createAnonymousClassName

 createAnonymousClassName()
Creates a unique name for an anonymous class.


accept

void accept(Visitor.TypeDeclarationVisitor visitor)
Invokes the 'visit...()' method of Visitor.TypeDeclarationVisitor for the concrete Java.TypeDeclaration type.


janino.net