|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.Type
org.eclipse.jdt.core.dom.WildcardType
Type node for a wildcard type (added in JLS3 API).
WildcardType: ? [ ( extends | super) Type ]
Not all node arrangements will represent legal Java constructs. In particular,
it is nonsense if a wildcard type node appears anywhere other than as an
argument of a ParameterizedType
node.
Field Summary | |
---|---|
static ChildPropertyDescriptor |
BOUND_PROPERTY
The "bound" structural property of this node type. |
static SimplePropertyDescriptor |
UPPER_BOUND_PROPERTY
The "upperBound" structural property of this node type. |
Method Summary | |
---|---|
Type |
getBound()
Returns the bound of this wildcard type if it has one. |
boolean |
isUpperBound()
Returns whether this wildcard type is an upper bound ("extends") as opposed to a lower bound ("super"). |
static List |
propertyDescriptors(int apiLevel)
Returns a list of structural property descriptors for this node type. |
void |
setBound(Type type)
Sets the bound of this wildcard type to the given type. |
void |
setBound(Type type,
boolean isUpperBound)
Sets the bound of this wildcard type to the given type and marks it as an upper or a lower bound. |
void |
setUpperBound(boolean isUpperBound)
Sets whether this wildcard type is an upper bound ("extends") as opposed to a lower bound ("super"). |
Methods inherited from class org.eclipse.jdt.core.dom.Type |
---|
isArrayType, isParameterizedType, isPrimitiveType, isQualifiedType, isSimpleType, isWildcardType, resolveBinding |
Methods inherited from class org.eclipse.jdt.core.dom.ASTNode |
---|
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ChildPropertyDescriptor BOUND_PROPERTY
public static final SimplePropertyDescriptor UPPER_BOUND_PROPERTY
Method Detail |
public static List propertyDescriptors(int apiLevel)
apiLevel
- the API level; one of the
AST.JLS*
constants
StructuralPropertyDescriptor
)public boolean isUpperBound()
Note that this property is irrelevant for wildcards that do not have a bound.
true
if an upper bound,
and false
if a lower boundsetBound(Type)
public Type getBound()
isUpperBound
returns true, this
is an upper bound ("? extends B"); if it returns false, this
is a lower bound ("? super B").
null
if nonesetBound(Type)
public void setBound(Type type, boolean isUpperBound)
setBound(type); setUpperBound(isUpperBound)
.
type
- the new bound of this wildcard type, or null
if noneisUpperBound
- true
for an upper bound ("? extends B"),
and false
for a lower bound ("? super B")
IllegalArgumentException
- if:
getBound()
,
isUpperBound()
public void setBound(Type type)
type
- the new bound of this wildcard type, or null
if none
IllegalArgumentException
- if:
getBound()
public void setUpperBound(boolean isUpperBound)
isUpperBound
- true
if an upper bound,
and false
if a lower boundisUpperBound()
|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |