org.eclipse.wst.jsdt.core
Interface ITypeParameter

All Superinterfaces:
IJavaScriptElement, ILookupScope, ISourceReference

public interface ITypeParameter
extends IJavaScriptElement, ISourceReference

Represents a type parameter defined by a type of a method in a compilation unit or a class file.

Type parameters are obtained using IType.getTypeParameter(String) and IFunction.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 IFunction.getTypeParameters() for a method.

Note: This Interface only applies to ECMAScript 4 which is not yet supported

This interface is not intended to be implemented by clients.

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
 
Fields inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement
CLASS_FILE, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVASCRIPT_MODEL, JAVASCRIPT_PROJECT, JAVASCRIPT_UNIT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER
 
Method Summary
 java.lang.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).
 
Methods inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement
exists, getAncestor, getAttachedJavadoc, getCommonSuperType, getCorrespondingResource, getDisplayName, getElementName, getElementType, getHandleIdentifier, getHostPath, getJavaScriptModel, getJavaScriptProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown, isVirtual
 
Methods inherited from interface org.eclipse.wst.jsdt.core.ILookupScope
newNameLookup, newNameLookup, newSearchableNameEnvironment, newSearchableNameEnvironment
 
Methods inherited from interface org.eclipse.wst.jsdt.core.ISourceReference
exists, getSource, getSourceRange
 

Method Detail

getBounds

java.lang.String[] getBounds()
                             throws JavaScriptModelException
Returns the names of the class and interface bounds of this type parameter. Returns an empty array if this type parameter has no bounds. A bound name is the name as it appears in the source (without the 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.

Returns:
the names of the bounds
Throws:
JavaScriptModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource

getDeclaringMember

IMember getDeclaringMember()
Returns the declaring member of this type parameter. This can be either an IType or an IFunction.

This is a handle-only method.

Returns:
the declaring member of this type parameter.

getNameRange

ISourceRange getNameRange()
                          throws JavaScriptModelException
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).

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)
Throws:
JavaScriptModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.