public abstract class TypeDeclaration<T extends Node> extends BodyDeclaration<T> implements NodeWithSimpleName<T>, NodeWithJavadoc<T>, NodeWithMembers<T>, NodeWithAccessModifiers<T>, NodeWithStaticModifier<T>, NodeWithStrictfpModifier<T>
Node.ObserverRegistrationMode
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
TypeDeclaration() |
TypeDeclaration(EnumSet<Modifier> modifiers,
String name) |
TypeDeclaration(NodeList<AnnotationExpr> annotations,
EnumSet<Modifier> modifiers,
SimpleName name,
NodeList<BodyDeclaration<?>> members) |
TypeDeclaration(Range range,
NodeList<AnnotationExpr> annotations,
EnumSet<Modifier> modifiers,
SimpleName name,
NodeList<BodyDeclaration<?>> members) |
Modifier and Type | Method and Description |
---|---|
T |
addMember(BodyDeclaration<?> decl)
Adds the given declaration to the specified type.
|
TypeDeclaration<?> |
clone() |
NodeList<BodyDeclaration<?>> |
getMembers() |
TypeDeclarationMetaModel |
getMetaModel() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this type declaration.
|
SimpleName |
getName() |
List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
boolean |
isNestedType() |
boolean |
isTopLevelType() |
boolean |
remove(Node node) |
T |
setMembers(NodeList<BodyDeclaration<?>> members) |
T |
setModifiers(EnumSet<Modifier> modifiers) |
T |
setName(SimpleName name) |
getAnnotations, setAnnotations
addOrphanComment, equals, getAllContainedComments, getChildNodes, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeOrphanComment, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
getNameAsString, setName
getComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocComment
addConstructor, addField, addField, addField, addInitializer, addMethod, addPrivateField, addPrivateField, addProtectedField, addProtectedField, addPublicField, addPublicField, addStaticInitializer, getFieldByName, getFields, getMember, getMethods, getMethodsByName, getMethodsByParameterTypes, getMethodsByParameterTypes, getMethodsBySignature, setMember
isPublic, setPublic
isPrivate, setPrivate
isProtected, setProtected
addModifier, removeModifier, setModifier
isStatic, setStatic
isStrictfp, setStrictfp
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
public TypeDeclaration()
public TypeDeclaration(NodeList<AnnotationExpr> annotations, EnumSet<Modifier> modifiers, SimpleName name, NodeList<BodyDeclaration<?>> members)
public TypeDeclaration(Range range, NodeList<AnnotationExpr> annotations, EnumSet<Modifier> modifiers, SimpleName name, NodeList<BodyDeclaration<?>> members)
public T addMember(BodyDeclaration<?> decl)
addMember
in interface NodeWithMembers<T extends Node>
decl
- member declarationpublic NodeList<BodyDeclaration<?>> getMembers()
getMembers
in interface NodeWithMembers<T extends Node>
public final EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<T extends Node>
Modifier
public T setMembers(NodeList<BodyDeclaration<?>> members)
setMembers
in interface NodeWithMembers<T extends Node>
public T setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<T extends Node>
public T setName(SimpleName name)
setName
in interface NodeWithSimpleName<T extends Node>
public final SimpleName getName()
getName
in interface NodeWithSimpleName<T extends Node>
public List<NodeList<?>> getNodeLists()
Node
getNodeLists
in class BodyDeclaration<T extends Node>
public boolean remove(Node node)
remove
in class BodyDeclaration<T extends Node>
public boolean isTopLevelType()
public boolean isNestedType()
public TypeDeclaration<?> clone()
clone
in class BodyDeclaration<T extends Node>
public TypeDeclarationMetaModel getMetaModel()
getMetaModel
in class BodyDeclaration<T extends Node>
Copyright © 2007–2017. All rights reserved.