public final class TypeParameter extends ReferenceType<TypeParameter> implements NodeWithSimpleName<TypeParameter>
This class represents the declaration of a generics argument.
The TypeParameter is constructed following the syntax:TypeParameter ::= <IDENTIFIER> ( "extends"ClassOrInterfaceType( "&"ClassOrInterfaceType)* )?
Node.ObserverRegistrationModeABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
TypeParameter() |
TypeParameter(Range range,
SimpleName name,
NodeList<ClassOrInterfaceType> typeBound) |
TypeParameter(Range range,
SimpleName name,
NodeList<ClassOrInterfaceType> typeBound,
NodeList<AnnotationExpr> annotations) |
TypeParameter(String name,
NodeList<ClassOrInterfaceType> typeBound) |
| 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.
|
NodeList<AnnotationExpr> |
getAnnotations() |
SimpleName |
getName()
Return the name of the paramenter.
|
NodeList<ClassOrInterfaceType> |
getTypeBound()
Return the list of
ClassOrInterfaceType that this parameter
extends. |
TypeParameter |
setAnnotations(NodeList<AnnotationExpr> annotations) |
TypeParameter |
setName(SimpleName name) |
TypeParameter |
setTypeBound(NodeList<ClassOrInterfaceType> typeBound) |
getAnnotation, getElementTypeaddOrphanComment, 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, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitgetNameAsString, setNamegetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic TypeParameter()
public TypeParameter(String name, NodeList<ClassOrInterfaceType> typeBound)
public TypeParameter(Range range, SimpleName name, NodeList<ClassOrInterfaceType> typeBound)
public TypeParameter(Range range, SimpleName name, NodeList<ClassOrInterfaceType> typeBound, 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)
Visitablepublic SimpleName getName()
getName in interface NodeWithSimpleName<TypeParameter>public NodeList<ClassOrInterfaceType> getTypeBound()
ClassOrInterfaceType that this parameter
extends. Return null null if there are no type.nullpublic TypeParameter setName(SimpleName name)
setName in interface NodeWithSimpleName<TypeParameter>public TypeParameter setTypeBound(NodeList<ClassOrInterfaceType> typeBound)
public NodeList<AnnotationExpr> getAnnotations()
getAnnotations in class Type<TypeParameter>public TypeParameter setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations in class Type<TypeParameter>Copyright © 2007–2016. All rights reserved.