public final class ClassOrInterfaceType extends ReferenceType implements NodeWithSimpleName<ClassOrInterfaceType>, NodeWithAnnotations<ClassOrInterfaceType>, NodeWithTypeArguments<ClassOrInterfaceType>
Object HashMap<String, String>
java.util.Punchcard
Note that the syntax is ambiguous here, and JavaParser does not know what is to the left of the class. It assumes
cases like Map.Entry where Map is the scope of Entry. In java.util.Punchcard, it will not
recognize that java and util are parts of the package name. Instead, it will set util as the scope of Punchcard, as a
ClassOrInterfaceType (which it is not.) In turn, util will have java as its scope, also as a
ClassOrInterfaceType
Node.ObserverRegistrationMode, Node.ParsednessABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
ClassOrInterfaceType() |
ClassOrInterfaceType(ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments) |
ClassOrInterfaceType(ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations) |
ClassOrInterfaceType(ClassOrInterfaceType scope,
String name) |
ClassOrInterfaceType(String name)
Deprecated.
use JavaParser.parseClassOrInterfaceType instead. This constructor does not understand generics.
|
ClassOrInterfaceType(TokenRange tokenRange,
ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
asReferenceType, ifReferenceType, isReferenceTypeasArrayType, asIntersectionType, asPrimitiveType, asTypeParameter, asUnionType, asUnknownType, asVoidType, asWildcardType, getAnnotation, getAnnotations, getArrayLevel, getElementType, ifArrayType, ifIntersectionType, ifPrimitiveType, ifTypeParameter, ifUnionType, ifUnknownType, ifVoidType, ifWildcardType, isArrayType, isIntersectionType, isPrimitiveType, isTypeParameter, isUnionType, isUnknownType, isVoidType, isWildcardTypeaddOrphanComment, containsData, customInitialization, equals, findCompilationUnit, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitgetNameAsString, setNameaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, getAnnotations, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitisUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArgumentsgetAncestorOfTypecontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforepublic ClassOrInterfaceType()
public ClassOrInterfaceType(String name)
public ClassOrInterfaceType(ClassOrInterfaceType scope, String name)
public ClassOrInterfaceType(ClassOrInterfaceType scope, SimpleName name, NodeList<Type> typeArguments)
public ClassOrInterfaceType(ClassOrInterfaceType scope, SimpleName name, NodeList<Type> typeArguments, NodeList<AnnotationExpr> annotations)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public ClassOrInterfaceType(TokenRange tokenRange, ClassOrInterfaceType scope, SimpleName name, NodeList<Type> typeArguments, NodeList<AnnotationExpr> annotations)
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 SimpleName getName()
getName in interface NodeWithSimpleName<ClassOrInterfaceType>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Optional<ClassOrInterfaceType> getScope()
public boolean isBoxedType()
public PrimitiveType toUnboxedType() throws UnsupportedOperationException
UnsupportedOperationException@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceType setName(SimpleName name)
setName in interface NodeWithSimpleName<ClassOrInterfaceType>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceType setScope(ClassOrInterfaceType scope)
scope - the scope, can be null@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Optional<NodeList<Type>> getTypeArguments()
getTypeArguments in interface NodeWithTypeArguments<ClassOrInterfaceType>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public ClassOrInterfaceType setTypeArguments(NodeList<Type> typeArguments)
setTypeArguments in interface NodeWithTypeArguments<ClassOrInterfaceType>typeArguments - the typeArguments, can be nullpublic ClassOrInterfaceType setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations in interface NodeWithAnnotations<ClassOrInterfaceType>setAnnotations in class Type@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove in class ReferenceType@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public ClassOrInterfaceType removeScope()
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public ClassOrInterfaceType clone()
clone in class ReferenceType@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public ClassOrInterfaceTypeMetaModel getMetaModel()
getMetaModel in class ReferenceType@Generated(value="com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace in class ReferenceType@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public boolean isClassOrInterfaceType()
isClassOrInterfaceType in class Type@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public ClassOrInterfaceType asClassOrInterfaceType()
asClassOrInterfaceType in class Type@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public void ifClassOrInterfaceType(Consumer<ClassOrInterfaceType> action)
ifClassOrInterfaceType in class Typepublic ResolvedReferenceType resolve()
resolve in interface Resolvable<Object>resolve in class TypeCopyright © 2007–2017. All rights reserved.