Package org.codehaus.janino
Class Java.AbstractTypeDeclaration
java.lang.Object
org.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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTypeDeclaration(Location location, Java.ModifiersAndAnnotations modifiersAndAnnotations) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidCreates a unique name for an anonymous class.createLocalTypeName(String localTypeName) Creates a unique name for a local class or interface.Return the member type with the given name.getMethodDeclaration(String name) Return the first method declared with the given name.voidvoidsetEnclosingScope(Java.Scope enclosingScope) voidthrowCompileException(String message) Throw aCompileExceptionwith the given message and this object's location.abstract StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.janino.Java.TypeDeclaration
accept, getClassName
-
Field Details
-
anonymousClassCount
public int anonymousClassCount -
localClassCount
public int localClassCount
-
-
Constructor Details
-
AbstractTypeDeclaration
public AbstractTypeDeclaration(Location location, Java.ModifiersAndAnnotations modifiersAndAnnotations)
-
-
Method Details
-
getModifiersAndAnnotations
- Specified by:
getModifiersAndAnnotationsin interfaceJava.TypeDeclaration
-
setEnclosingScope
-
getEnclosingScope
- Specified by:
getEnclosingScopein interfaceJava.Scope
-
invalidateMethodCaches
public void invalidateMethodCaches() -
addMemberTypeDeclaration
-
getMemberTypeDeclarations
- Specified by:
getMemberTypeDeclarationsin interfaceJava.TypeDeclaration
-
getMemberTypeDeclaration
Description copied from interface:Java.TypeDeclarationReturn the member type with the given name.- Specified by:
getMemberTypeDeclarationin interfaceJava.TypeDeclaration- Returns:
nullif a member type with that name is not declared
-
addDeclaredMethod
-
getMethodDeclaration
Description copied from interface:Java.TypeDeclarationReturn the first method declared with the given name. (Does not honor inherited methods.)- Specified by:
getMethodDeclarationin interfaceJava.TypeDeclaration- Returns:
nullif a method with this name is not declared
-
getMethodDeclarations
- Specified by:
getMethodDeclarationsin interfaceJava.TypeDeclaration
-
createLocalTypeName
Description copied from interface:Java.TypeDeclarationCreates a unique name for a local class or interface.- Specified by:
createLocalTypeNamein interfaceJava.TypeDeclaration
-
createAnonymousClassName
Description copied from interface:Java.TypeDeclarationCreates a unique name for an anonymous class.- Specified by:
createAnonymousClassNamein interfaceJava.TypeDeclaration
-
getLocation
- Specified by:
getLocationin interfaceJava.Locatable
-
throwCompileException
Description copied from interface:Java.LocatableThrow aCompileExceptionwith the given message and this object's location.- Specified by:
throwCompileExceptionin interfaceJava.Locatable- Parameters:
message- The message to report- Throws:
CompileException
-
toString
-