public final class ClassOrInterfaceType extends ReferenceType<ClassOrInterfaceType> implements NodeWithSimpleName<ClassOrInterfaceType>, NodeWithAnnotations<ClassOrInterfaceType>, NodeWithTypeArguments<ClassOrInterfaceType>
Node.ObserverRegistrationMode
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
ClassOrInterfaceType() |
ClassOrInterfaceType(ClassOrInterfaceType scope,
String name) |
ClassOrInterfaceType(Range range,
ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type<?>> typeArguments) |
ClassOrInterfaceType(String name) |
Modifier and Type | Method and Description |
---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
SimpleName |
getName() |
Optional<ClassOrInterfaceType> |
getScope() |
Optional<NodeList<Type<?>>> |
getTypeArguments() |
boolean |
isBoxedType() |
ClassOrInterfaceType |
setName(SimpleName name) |
ClassOrInterfaceType |
setScope(ClassOrInterfaceType scope)
Sets the scope
|
ClassOrInterfaceType |
setTypeArguments(NodeList<Type<?>> typeArguments)
Sets the typeArguments
|
PrimitiveType |
toUnboxedType() |
getAnnotation, getAnnotations, setAnnotations
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodeLists, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
getNameAsString, setName
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, getAnnotations, isAnnotationPresent, isAnnotationPresent, setAnnotations
isUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArguments
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
public ClassOrInterfaceType()
public ClassOrInterfaceType(String name)
public ClassOrInterfaceType(ClassOrInterfaceType scope, String name)
public ClassOrInterfaceType(Range range, ClassOrInterfaceType scope, SimpleName name, NodeList<Type<?>> typeArguments)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- 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
public SimpleName getName()
getName
in interface NodeWithSimpleName<ClassOrInterfaceType>
public Optional<ClassOrInterfaceType> getScope()
public boolean isBoxedType()
public PrimitiveType toUnboxedType() throws UnsupportedOperationException
UnsupportedOperationException
public ClassOrInterfaceType setName(SimpleName name)
setName
in interface NodeWithSimpleName<ClassOrInterfaceType>
public ClassOrInterfaceType setScope(ClassOrInterfaceType scope)
scope
- the scope, can be nullpublic Optional<NodeList<Type<?>>> getTypeArguments()
getTypeArguments
in interface NodeWithTypeArguments<ClassOrInterfaceType>
public ClassOrInterfaceType setTypeArguments(NodeList<Type<?>> typeArguments)
setTypeArguments
in interface NodeWithTypeArguments<ClassOrInterfaceType>
typeArguments
- the typeArguments, can be nullCopyright © 2007–2016. All rights reserved.