public abstract static class Java.AbstractTypeDeclaration extends Object implements Java.TypeDeclaration
Modifier and Type | Field and Description |
---|---|
int |
anonymousClassCount |
int |
localClassCount |
Constructor and Description |
---|
AbstractTypeDeclaration(Location location,
short modifiers) |
Modifier and Type | Method and Description |
---|---|
void |
addDeclaredMethod(Java.MethodDeclarator method) |
void |
addMemberTypeDeclaration(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() |
Java.MemberTypeDeclaration |
getMemberTypeDeclaration(String name)
Return the member type with the given name.
|
Collection |
getMemberTypeDeclarations() |
Java.MethodDeclarator |
getMethodDeclaration(String name)
Return the first method declared with the given name.
|
List |
getMethodDeclarations() |
short |
getModifiers() |
void |
invalidateMethodCaches() |
void |
setEnclosingScope(Java.Scope enclosingScope) |
void |
throwCompileException(String message)
Throw a
CompileException with the given message and this
object's location. |
abstract String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, getClassName
public int anonymousClassCount
public int localClassCount
public AbstractTypeDeclaration(Location location, short modifiers)
public short getModifiers()
getModifiers
in interface Java.TypeDeclaration
public void setEnclosingScope(Java.Scope enclosingScope)
public Java.Scope getEnclosingScope()
getEnclosingScope
in interface Java.Scope
public void invalidateMethodCaches()
public void addMemberTypeDeclaration(Java.MemberTypeDeclaration mcoid)
public Collection getMemberTypeDeclarations()
getMemberTypeDeclarations
in interface Java.TypeDeclaration
public Java.MemberTypeDeclaration getMemberTypeDeclaration(String name)
Java.TypeDeclaration
getMemberTypeDeclaration
in interface Java.TypeDeclaration
null
if a member type with that name is not declaredpublic void addDeclaredMethod(Java.MethodDeclarator method)
public Java.MethodDeclarator getMethodDeclaration(String name)
Java.TypeDeclaration
getMethodDeclaration
in interface Java.TypeDeclaration
null
if a method with this name is not declaredpublic List getMethodDeclarations()
getMethodDeclarations
in interface Java.TypeDeclaration
public String createLocalTypeName(String localTypeName)
Java.TypeDeclaration
createLocalTypeName
in interface Java.TypeDeclaration
public String createAnonymousClassName()
Java.TypeDeclaration
createAnonymousClassName
in interface Java.TypeDeclaration
public Location getLocation()
getLocation
in interface Java.Locatable
public void throwCompileException(String message) throws CompileException
Java.Locatable
CompileException
with the given message and this
object's location.throwCompileException
in interface Java.Locatable
message
- The message to reportCompileException
Copyright © 2001–2014. All rights reserved.