Web Site

org.codehaus.janino
Class Java.AbstractTypeDeclaration

java.lang.Object
  extended byorg.codehaus.janino.Java.AbstractTypeDeclaration
All Implemented Interfaces:
Java.Locatable, Java.Scope, Java.TypeDeclaration
Direct Known Subclasses:
Java.ClassDeclaration, Java.InterfaceDeclaration
Enclosing class:
Java

public abstract static class Java.AbstractTypeDeclaration
extends Object
implements Java.TypeDeclaration


Field Summary
 int anonymousClassCount
           
protected  Java.Scope enclosingScope
           
 int localClassCount
           
protected  short modifiers
           
 
Constructor Summary
Java.AbstractTypeDeclaration(Location location, Java.Scope enclosingScope, short modifiers)
           
 
Method Summary
 void addDeclaredMethod(Java.MethodDeclarator method)
           
 void addMemberTypeDeclaration(org.codehaus.janino.Java.MemberTypeDeclaration mcoid)
           
 String createAnonymousClassName()
          Creates a unique name for an anonymous class.
 String createLocalTypeName(String localTypeName)
          Creates a unique name for a local class or interface.
 Java.Scope getEnclosingScope()
           
 Location getLocation()
           
 org.codehaus.janino.Java.MemberTypeDeclaration getMemberTypeDeclaration(String name)
          Return the member type with the given name.
 Collection getMemberTypeDeclarations()
           
 void throwParseException(String message)
          Throw a Parser.ParseException with the given message and this object's location.
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.janino.Java.TypeDeclaration
getClassName, visit
 

Field Detail

enclosingScope

protected final Java.Scope enclosingScope

modifiers

protected final short modifiers

anonymousClassCount

public int anonymousClassCount

localClassCount

public int localClassCount
Constructor Detail

Java.AbstractTypeDeclaration

public Java.AbstractTypeDeclaration(Location location,
                                    Java.Scope enclosingScope,
                                    short modifiers)
Method Detail

addDeclaredMethod

public void addDeclaredMethod(Java.MethodDeclarator method)

getEnclosingScope

public Java.Scope getEnclosingScope()
Specified by:
getEnclosingScope in interface Java.Scope
Returns:
Enclusing scope or "null".

addMemberTypeDeclaration

public void addMemberTypeDeclaration(org.codehaus.janino.Java.MemberTypeDeclaration mcoid)

getMemberTypeDeclarations

public Collection getMemberTypeDeclarations()

getMemberTypeDeclaration

public org.codehaus.janino.Java.MemberTypeDeclaration getMemberTypeDeclaration(String name)
Description copied from interface: Java.TypeDeclaration
Return the member type with the given name.

Specified by:
getMemberTypeDeclaration in interface Java.TypeDeclaration
Returns:
null if a member type with that name is not declared

createLocalTypeName

public String createLocalTypeName(String localTypeName)
Description copied from interface: Java.TypeDeclaration
Creates a unique name for a local class or interface.

Specified by:
createLocalTypeName in interface Java.TypeDeclaration

createAnonymousClassName

public String createAnonymousClassName()
Description copied from interface: Java.TypeDeclaration
Creates a unique name for an anonymous class.

Specified by:
createAnonymousClassName in interface Java.TypeDeclaration

getLocation

public Location getLocation()
Specified by:
getLocation in interface Java.Locatable

throwParseException

public void throwParseException(String message)
                         throws Parser.ParseException
Description copied from interface: Java.Locatable
Throw a Parser.ParseException with the given message and this object's location.

Specified by:
throwParseException in interface Java.Locatable
Parameters:
message - The message to report
Throws:
Parser.ParseException

toString

public abstract String toString()

Web Site