public interface ITypeParameter extends IJavaElement, ISourceReference
Type parameters are obtained using IType.getTypeParameter(String)
and
IMethod.getTypeParameter(String)
.
Note that type parameters are not children of their declaring type or method. To get a list
of the type parameters use IType.getTypeParameters()
for a type and use
IMethod.getTypeParameters()
for a method.
This interface is not intended to be implemented by clients.
CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER
Modifier and Type | Method and Description |
---|---|
String[] |
getBounds()
Returns the names of the class and interface bounds of this type parameter.
|
IMember |
getDeclaringMember()
Returns the declaring member of this type parameter.
|
ISourceRange |
getNameRange()
Returns the source range of this type parameter's name,
or
null if this type parameter does not have
associated source code (for example, in a binary type). |
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementName, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown
getAdapter
exists, getSource, getSourceRange
String[] getBounds() throws JavaModelException
extends
keyword) if the type parameter comes from a
compilation unit. It is the dot-separated fully qualified name of the bound if the type
parameter comes from a class file.JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceIMember getDeclaringMember()
IType
or an IMethod
.
This is a handle-only method.
ISourceRange getNameRange() throws JavaModelException
null
if this type parameter does not have
associated source code (for example, in a binary type).null
if this type parameter does not have
associated source code (for example, in a binary type)JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resource.Copyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.