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,
java.lang.String name,
java.util.List<ClassOrInterfaceType> typeBound) |
TypeParameter(int beginLine,
int beginColumn,
int endLine,
int endColumn,
java.lang.String name,
java.util.List<ClassOrInterfaceType> typeBound,
java.util.List<AnnotationExpr> annotations) |
TypeParameter(java.lang.String name,
java.util.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.
|
java.util.List<AnnotationExpr> |
getAnnotations() |
java.lang.String |
getName()
Return the name of the paramenter.
|
java.util.List<ClassOrInterfaceType> |
getTypeBound()
Return the list of
ClassOrInterfaceType that this parameter
extends. |
void |
setAnnotations(java.util.List<AnnotationExpr> annotations) |
void |
setName(java.lang.String name)
Sets the name of this type parameter.
|
void |
setTypeBound(java.util.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, toStringWithoutComments
public TypeParameter()
public TypeParameter(java.lang.String name, java.util.List<ClassOrInterfaceType> typeBound)
public TypeParameter(int beginLine, int beginColumn, int endLine, int endColumn, java.lang.String name, java.util.List<ClassOrInterfaceType> typeBound)
public TypeParameter(int beginLine, int beginColumn, int endLine, int endColumn, java.lang.String name, java.util.List<ClassOrInterfaceType> typeBound, java.util.List<AnnotationExpr> annotations)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public java.lang.String getName()
public java.util.List<ClassOrInterfaceType> getTypeBound()
ClassOrInterfaceType
that this parameter
extends. Return null
null if there are no type.null
public void setName(java.lang.String name)
name
- the name to setpublic void setTypeBound(java.util.List<ClassOrInterfaceType> typeBound)
typeBound
- the typeBound to setpublic java.util.List<AnnotationExpr> getAnnotations()
public void setAnnotations(java.util.List<AnnotationExpr> annotations)
Copyright © 2007-2015. All Rights Reserved.