Skip navigation links
oracle.javatools.parser.java.v2.model
Interface JavaWildcardType
- All Superinterfaces:
- Element, JavaElement, JavaHasAnnotations, JavaHasName, JavaHasType, JavaIsGeneric, JavaMember, JavaType
-
public interface JavaWildcardType
- extends JavaType
The WildcardType is a new concept in jdk 1.5. A WildcardType has a superclass and possibly one super-interface. A WildcardType declares no fields, methods, constructors, or inner classes. If no superclass was declared, then java/lang/Object is the implicit superclass. Because wildcard types have a superclass and possible a super-interface, of super-interfaces, they may have hierarchies.
Wildcard types are not interface, enum, annotation, primitive, or array types. Note that a WildcardType does not have a proper name and "?" will be returned for its name, qualified name, and raw name.
Intersection types are represented as wildcard types.
Method Summary |
java.util.Collection |
getLowerBounds()
Lower bounds are "super" bounds. |
java.util.Collection |
getUpperBounds()
Upper bounds are "extends" bounds. |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaType |
equals, getArrayDimensions, getBaseComponentType, getClass, getClasses, getClinitMethod, getClosestClass, getComponentType, getDeclaredClass, getDeclaredClasses, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDescriptor, getField, getFields, getHierarchy, getInterfaces, getMethod, getMethods, getMethods, getName, getPackage, getPackageName, getQualifiedName, getRawName, getSignature, getSuperclass, getThisValue, getTypeErasure, getTypeSignature, getUniqueIdentifier, getUnqualifiedName, getUnresolvedInterfaces, getURL, getVMName, isAnnotation, isArray, isAssignableFrom, isEnum, isExported, isInterface, isMemberClass, isPrimitive, isSubtypeOf |
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement |
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo |
getUpperBounds
java.util.Collection getUpperBounds()
- Upper bounds are "extends" bounds.
-
- Returns:
- The upper (inclusive) bounds, if any. Must be a reference type. Collection of JavaType's.
getLowerBounds
java.util.Collection getLowerBounds()
- Lower bounds are "super" bounds.
-
- Returns:
- The lower (inclusive) bounds. Empty if none. If non-empty, all bounds must be reference types. Collection of JavaType's.
Note: This is not like java/lang/reflect/WildcardType which returns the primitive type "null" if no lower bound was declared.
Skip navigation links
Copyright © 1997, 2011, Oracle. All rights reserved.