public final class TypeParameter extends Node implements NamedNode
This class represents the declaration of a generics argument.
The TypeParameter is constructed following the syntax:TypeParameter ::= <IDENTIFIER> ( "extends"ClassOrInterfaceType( "&"ClassOrInterfaceType)* )?
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE| Constructor and Description |
|---|
TypeParameter() |
TypeParameter(int beginLine,
int beginColumn,
int endLine,
int endColumn,
String name,
List<ClassOrInterfaceType> typeBound) |
TypeParameter(int beginLine,
int beginColumn,
int endLine,
int endColumn,
String name,
List<ClassOrInterfaceType> typeBound,
List<AnnotationExpr> annotations) |
TypeParameter(String name,
List<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.
|
List<AnnotationExpr> |
getAnnotations() |
String |
getName()
Return the name of the paramenter.
|
List<ClassOrInterfaceType> |
getTypeBound()
Return the list of
ClassOrInterfaceType that this parameter
extends. |
void |
setAnnotations(List<AnnotationExpr> annotations) |
void |
setName(String name)
Sets the name of this type parameter.
|
void |
setTypeBound(List<ClassOrInterfaceType> typeBound)
Sets the list o types.
|
addOrphanComment, clone, contains, equals, getAllContainedComments, getBeginColumn, getBeginLine, getChildrenNodes, getComment, getData, getEndColumn, getEndLine, getOrphanComments, getParentNode, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBeginColumn, setBeginLine, setComment, setData, setEndColumn, setEndLine, setParentNode, toString, toStringWithoutCommentspublic TypeParameter()
public TypeParameter(String name, List<ClassOrInterfaceType> typeBound)
public TypeParameter(int beginLine,
int beginColumn,
int endLine,
int endColumn,
String name,
List<ClassOrInterfaceType> typeBound)
public TypeParameter(int beginLine,
int beginColumn,
int endLine,
int endColumn,
String name,
List<ClassOrInterfaceType> typeBound,
List<AnnotationExpr> annotations)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Nodepublic <A> void accept(VoidVisitor<A> v, A arg)
Nodepublic String getName()
public List<ClassOrInterfaceType> getTypeBound()
ClassOrInterfaceType that this parameter
extends. Return null null if there are no type.nullpublic void setName(String name)
name - the name to setpublic void setTypeBound(List<ClassOrInterfaceType> typeBound)
typeBound - the typeBound to setpublic List<AnnotationExpr> getAnnotations()
public void setAnnotations(List<AnnotationExpr> annotations)
Copyright © 2007–2016. All rights reserved.