Package org.codehaus.janino
Class Java.NamedClassDeclaration
- java.lang.Object
-
- org.codehaus.janino.Java.AbstractTypeDeclaration
-
- org.codehaus.janino.Java.ClassDeclaration
-
- org.codehaus.janino.Java.NamedClassDeclaration
-
- All Implemented Interfaces:
Java.DocCommentable
,Java.Locatable
,Java.NamedTypeDeclaration
,Java.Scope
,Java.TypeDeclaration
- Direct Known Subclasses:
Java.LocalClassDeclaration
,Java.MemberClassDeclaration
,Java.PackageMemberClassDeclaration
- Enclosing class:
- Java
public abstract static class Java.NamedClassDeclaration extends Java.ClassDeclaration implements Java.NamedTypeDeclaration, Java.DocCommentable
Base for the various named class declarations.
-
-
Field Summary
Fields Modifier and Type Field Description Java.Type[]
implementedTypes
The types of the implemented interfaces.java.lang.String
name
The simple name of this class.private java.lang.String
optionalDocComment
Java.Type
optionalExtendedType
The type of the extended class.Java.TypeParameter[]
optionalTypeParameters
The optional type parameters of this interface.-
Fields inherited from class org.codehaus.janino.Java.ClassDeclaration
constructors, syntheticFields, variableDeclaratorsAndInitializers
-
Fields inherited from class org.codehaus.janino.Java.AbstractTypeDeclaration
anonymousClassCount, localClassCount, resolvedType
-
-
Constructor Summary
Constructors Constructor Description NamedClassDeclaration(Location location, java.lang.String optionalDocComment, Java.Modifiers modifiers, java.lang.String name, Java.TypeParameter[] optionalTypeParameters, Java.Type optionalExtendedType, Java.Type[] implementedTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDocComment()
java.lang.String
getName()
Java.TypeParameter[]
getOptionalTypeParameters()
boolean
hasDeprecatedDocTag()
Returnstrue
if the object has a doc comment and the@deprecated
tag appears in the doc comment.java.lang.String
toString()
-
Methods inherited from class org.codehaus.janino.Java.ClassDeclaration
addConstructor, addFieldDeclaration, addInitializer, defineSyntheticField, getConstructors
-
Methods inherited from class org.codehaus.janino.Java.AbstractTypeDeclaration
addDeclaredMethod, addMemberTypeDeclaration, createAnonymousClassName, createLocalTypeName, getAnnotations, getEnclosingScope, getLocation, getMemberTypeDeclaration, getMemberTypeDeclarations, getMethodDeclaration, getMethodDeclarations, getModifierFlags, invalidateMethodCaches, setEnclosingScope, throwCompileException
-
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.Locatable
getLocation, throwCompileException
-
Methods inherited from interface org.codehaus.janino.Java.Scope
getEnclosingScope
-
Methods inherited from interface org.codehaus.janino.Java.TypeDeclaration
accept, createAnonymousClassName, createLocalTypeName, getAnnotations, getClassName, getMemberTypeDeclaration, getMemberTypeDeclarations, getMethodDeclaration, getMethodDeclarations, getModifierFlags
-
-
-
-
Field Detail
-
optionalDocComment
private final java.lang.String optionalDocComment
-
name
public final java.lang.String name
The simple name of this class.
-
optionalTypeParameters
public final Java.TypeParameter[] optionalTypeParameters
The optional type parameters of this interface.
-
optionalExtendedType
public final Java.Type optionalExtendedType
The type of the extended class.
-
implementedTypes
public final Java.Type[] implementedTypes
The types of the implemented interfaces.
-
-
Constructor Detail
-
NamedClassDeclaration
public NamedClassDeclaration(Location location, java.lang.String optionalDocComment, Java.Modifiers modifiers, java.lang.String name, Java.TypeParameter[] optionalTypeParameters, Java.Type optionalExtendedType, Java.Type[] implementedTypes)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Specified by:
toString
in classJava.AbstractTypeDeclaration
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceJava.NamedTypeDeclaration
- Returns:
- The declared (not the fully qualified) name of the class or interface
-
getOptionalTypeParameters
public Java.TypeParameter[] getOptionalTypeParameters()
- Specified by:
getOptionalTypeParameters
in interfaceJava.NamedTypeDeclaration
- Returns:
- The declared type parameters
-
getDocComment
public java.lang.String getDocComment()
- Specified by:
getDocComment
in interfaceJava.DocCommentable
- Returns:
- The doc comment of the object or
null
-
hasDeprecatedDocTag
public boolean hasDeprecatedDocTag()
Description copied from interface:Java.DocCommentable
Returnstrue
if the object has a doc comment and the@deprecated
tag appears in the doc comment.- Specified by:
hasDeprecatedDocTag
in interfaceJava.DocCommentable
-
-