|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.core.dom.ASTNode
org.eclipse.wst.jsdt.core.dom.Type
org.eclipse.wst.jsdt.core.dom.WildcardType
public class WildcardType
Type node for a wildcard type (added in JLS3 API).
WildcardType: ? [ ( extends | super) Type ]
Not all node arrangements will represent legal JavaScript constructs. In particular,
it is nonsense if a wildcard type node appears anywhere other than as an
argument of a ParameterizedType
node.
Note: This Class only applies to ECMAScript 4 which is not yet supported
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
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 java.util.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.wst.jsdt.core.dom.Type |
---|
isArrayType, isInferred, isParameterizedType, isPrimitiveType, isQualifiedType, isSimpleType, isWildcardType, resolveBinding |
Methods inherited from class org.eclipse.wst.jsdt.core.dom.ASTNode |
---|
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, hashCode, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ChildPropertyDescriptor BOUND_PROPERTY
public static final SimplePropertyDescriptor UPPER_BOUND_PROPERTY
Method Detail |
---|
public static java.util.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")
java.lang.IllegalArgumentException
- if:
getBound()
,
isUpperBound()
public void setBound(Type type)
type
- the new bound of this wildcard type, or null
if none
java.lang.IllegalArgumentException
- if:
getBound()
public void setUpperBound(boolean isUpperBound)
isUpperBound
- true
if an upper bound,
and false
if a lower boundisUpperBound()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |