public final class ClassOrInterfaceDeclaration extends TypeDeclaration<ClassOrInterfaceDeclaration> implements NodeWithImplements<ClassOrInterfaceDeclaration>, NodeWithExtends<ClassOrInterfaceDeclaration>, NodeWithTypeParameters<ClassOrInterfaceDeclaration>, NodeWithAbstractModifier<ClassOrInterfaceDeclaration>, NodeWithFinalModifier<ClassOrInterfaceDeclaration>
class X { ... }Node.ObserverRegistrationMode, Node.ParsednessABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
ClassOrInterfaceDeclaration() |
ClassOrInterfaceDeclaration(EnumSet<Modifier> modifiers,
boolean isInterface,
String name) |
ClassOrInterfaceDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
boolean isInterface,
SimpleName name,
NodeList<TypeParameter> typeParameters,
NodeList<ClassOrInterfaceType> extendedTypes,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<BodyDeclaration<?>> members) |
ClassOrInterfaceDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
boolean isInterface,
SimpleName name,
NodeList<TypeParameter> typeParameters,
NodeList<ClassOrInterfaceType> extendedTypes,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<BodyDeclaration<?>> members)
This constructor is used by the parser and is considered private.
|
addMember, getCallablesWithSignature, getMembers, getModifiers, getName, isNestedType, isTopLevelType, setMembers, setModifiers, setNamegetAnnotations, setAnnotationsaddOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitaddImplementedType, addImplementedType, addImplementedType, addImplements, addImplements, getImplementedTypes, setImplementedType, tryAddImportToParentCompilationUnitaddExtendedType, addExtendedType, addExtendedType, addExtends, addExtends, getExtendedTypes, setExtendedType, tryAddImportToParentCompilationUnitaddTypeParameter, getTypeParameter, isGeneric, setTypeParameterisAbstract, setAbstractisFinal, setFinaladdModifier, getModifiers, removeModifier, setModifier, setModifiersgetNameAsString, setNamegetComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocCommentaddField, addField, addField, addInitializer, addMethod, addPrivateField, addPrivateField, addProtectedField, addProtectedField, addPublicField, addPublicField, addStaticInitializer, getFieldByName, getFields, getMember, getMethods, getMethodsByName, getMethodsByParameterTypes, getMethodsByParameterTypes, getMethodsBySignature, setMember, tryAddImportToParentCompilationUnitisPublic, setPublicisPrivate, setPrivateisProtected, setProtectedisStatic, setStaticisStrictfp, setStrictfpaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitgetAncestorOfTypecontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforepublic ClassOrInterfaceDeclaration()
public ClassOrInterfaceDeclaration(EnumSet<Modifier> modifiers, boolean isInterface, String name)
public ClassOrInterfaceDeclaration(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, boolean isInterface, SimpleName name, NodeList<TypeParameter> typeParameters, NodeList<ClassOrInterfaceType> extendedTypes, NodeList<ClassOrInterfaceType> implementedTypes, NodeList<BodyDeclaration<?>> members)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public ClassOrInterfaceDeclaration(TokenRange tokenRange, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, boolean isInterface, SimpleName name, NodeList<TypeParameter> typeParameters, NodeList<ClassOrInterfaceType> extendedTypes, NodeList<ClassOrInterfaceType> implementedTypes, NodeList<BodyDeclaration<?>> members)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitable@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<ClassOrInterfaceType> getExtendedTypes()
getExtendedTypes in interface NodeWithExtends<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<ClassOrInterfaceType> getImplementedTypes()
getImplementedTypes in interface NodeWithImplements<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<TypeParameter> getTypeParameters()
getTypeParameters in interface NodeWithTypeParameters<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public boolean isInterface()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceDeclaration setExtendedTypes(NodeList<ClassOrInterfaceType> extendedTypes)
setExtendedTypes in interface NodeWithExtends<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceDeclaration setImplementedTypes(NodeList<ClassOrInterfaceType> implementedTypes)
setImplementedTypes in interface NodeWithImplements<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceDeclaration setInterface(boolean isInterface)
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceDeclaration setTypeParameters(NodeList<TypeParameter> typeParameters)
setTypeParameters in interface NodeWithTypeParameters<ClassOrInterfaceDeclaration>public Optional<ConstructorDeclaration> getDefaultConstructor()
ConstructorDeclaration with no parameters by its namepublic ConstructorDeclaration addConstructor(Modifier... modifiers)
modifiers - the modifiers like Modifier.PUBLICMethodDeclaration createdpublic List<ConstructorDeclaration> getConstructors()
public Optional<ConstructorDeclaration> getConstructorByParameterTypes(String... paramTypes)
MethodDeclaration by its parameters typesparamTypes - the types of parameters like "Map<Integer,String>","int" to matchpublic Optional<ConstructorDeclaration> getConstructorByParameterTypes(Class<?>... paramTypes)
MethodDeclaration by its parameters typesparamTypes - the types of parameters like "Map<Integer,String>","int" to match@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class TypeDeclaration<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class TypeDeclaration<ClassOrInterfaceDeclaration>public boolean isLocalClassDeclaration()
public boolean isInnerClass()
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public ClassOrInterfaceDeclaration clone()
clone in class TypeDeclaration<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public ClassOrInterfaceDeclarationMetaModel getMetaModel()
getMetaModel in class TypeDeclaration<ClassOrInterfaceDeclaration>@Generated(value="com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace in class TypeDeclaration<ClassOrInterfaceDeclaration>Copyright © 2007–2017. All rights reserved.