public abstract class TypeDeclaration<T> extends BodyDeclaration<T> implements NodeWithName<T>, NodeWithJavaDoc<T>, NodeWithModifiers<T>, NodeWithMembers<T>
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION
Constructor and Description |
---|
TypeDeclaration() |
TypeDeclaration(EnumSet<Modifier> modifiers,
String name) |
TypeDeclaration(NodeList<AnnotationExpr> annotations,
EnumSet<Modifier> modifiers,
NameExpr name,
NodeList<BodyDeclaration<?>> members) |
TypeDeclaration(Range range,
NodeList<AnnotationExpr> annotations,
EnumSet<Modifier> modifiers,
NameExpr name,
NodeList<BodyDeclaration<?>> members) |
Modifier and Type | Method and Description |
---|---|
TypeDeclaration<T> |
addMember(BodyDeclaration<?> decl)
Adds the given declaration to the specified type.
|
Optional<JavadocComment> |
getJavaDoc()
Gets the JavaDoc for this node.
|
NodeList<BodyDeclaration<?>> |
getMembers() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this type declaration.
|
String |
getName() |
NameExpr |
getNameExpr() |
T |
setMembers(NodeList<BodyDeclaration<?>> members) |
T |
setModifiers(EnumSet<Modifier> modifiers) |
T |
setName(String name) |
T |
setNameExpr(NameExpr nameExpr) |
getAnnotations, setAnnotations
accept, accept, addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBackwardsCompatibleChildrenNodes, getBegin, getChildrenNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, getUserData, hashCode, isPositionedAfter, isPositionedBefore, remove, setAsParentNodeOf, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
finalize, getClass, notify, notifyAll, wait, wait, wait
setJavaDocComment
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
addCtor, addField, addField, addField, addInitializer, addMethod, addPrivateField, addPrivateField, addProtectedField, addProtectedField, addPublicField, addPublicField, addStaticInitializer, getFieldByName, getFields, getMethods, getMethodsByName, getMethodsByParameterTypes, getMethodsByParameterTypes
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent
public TypeDeclaration()
public TypeDeclaration(NodeList<AnnotationExpr> annotations, EnumSet<Modifier> modifiers, NameExpr name, NodeList<BodyDeclaration<?>> members)
public TypeDeclaration(Range range, NodeList<AnnotationExpr> annotations, EnumSet<Modifier> modifiers, NameExpr name, NodeList<BodyDeclaration<?>> members)
public TypeDeclaration<T> addMember(BodyDeclaration<?> decl)
decl
- member declarationpublic NodeList<BodyDeclaration<?>> getMembers()
getMembers
in interface NodeWithMembers<T>
public final EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<T>
Modifier
public final String getName()
getName
in interface NodeWithName<T>
public T setMembers(NodeList<BodyDeclaration<?>> members)
setMembers
in interface NodeWithMembers<T>
public T setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<T>
public T setName(String name)
setName
in interface NodeWithName<T>
public final NameExpr getNameExpr()
public Optional<JavadocComment> getJavaDoc()
NodeWithJavaDoc
getJavaDoc
in interface NodeWithJavaDoc<T>
Copyright © 2007–2016. All rights reserved.