Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core.utility.jdt
Interface TypeBinding


public interface TypeBinding

Represents a java type declaration, field type, method return type, etc. Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is 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.

Since:
3.3

Method Summary
 String getArrayComponentTypeName()
          Return the component type name of the array, null otherwise.
 int getArrayDimensionality()
          Return the dimensionality of the array, 0 otherwise.
 String getPackageName()
          Return the package name (or null)
 String getQualifiedName()
          Return the resolved, qualified name of the attribute's type (e.g.
 String getSimpleName()
          Returns the unqualified version of getQualifiedName()
 String getTypeArgumentName(int index)
           
 org.eclipse.jpt.common.utility.iterable.ListIterable<String> getTypeArgumentNames()
          Return the fully qualified names of the type arguments, if any.
 int getTypeArgumentNamesSize()
           
 boolean isArray()
          Return whether the type is an array.
 boolean isEnum()
          Return whether the type resolves to an enum type.
 boolean isGenericTypeDeclaration()
          Return whether type represents a generic type *declaration*.
 boolean isInterface()
          Return whether the type resolves to an interface type.
 boolean isMemberTypeDeclaration()
          Return whether type represents a member type *declaration*.
 boolean isSubTypeOf(String typeName)
          Return whether the type implements or extends the specified type.
 boolean isVariablePrimitive()
          Return whether the type is a "variable" primitive type (i.e. any primitive type except 'void').
 

Method Detail

getQualifiedName

String getQualifiedName()
Return the resolved, qualified name of the attribute's type (e.g. "java.util.Collection" or "byte[]"). If the type is an array, this name will include the appropriate number of bracket pairs. This name will not include the type's generic type arguments (e.g. "java.util.Collection" will only return "java.util.Collection"). This name will not include generic types, but will resolve to the most specific type available. (e.g. "?" will return "java.lang.Object", "T" (which extends Serializable in the class declaration) will return "java.io.Serializable")


getSimpleName

String getSimpleName()
Returns the unqualified version of getQualifiedName()


getPackageName

String getPackageName()
Return the package name (or null)


isInterface

boolean isInterface()
Return whether the type resolves to an interface type.


isEnum

boolean isEnum()
Return whether the type resolves to an enum type.


isVariablePrimitive

boolean isVariablePrimitive()
Return whether the type is a "variable" primitive type (i.e. any primitive type except 'void').


isGenericTypeDeclaration

boolean isGenericTypeDeclaration()
Return whether type represents a generic type *declaration*.


isMemberTypeDeclaration

boolean isMemberTypeDeclaration()
Return whether type represents a member type *declaration*.


isSubTypeOf

boolean isSubTypeOf(String typeName)
Return whether the type implements or extends the specified type.


isArray

boolean isArray()
Return whether the type is an array.


getArrayDimensionality

int getArrayDimensionality()
Return the dimensionality of the array, 0 otherwise. (String[][] -> 2, Collection -> 0)


getArrayComponentTypeName

String getArrayComponentTypeName()
Return the component type name of the array, null otherwise. (String[][] -> "java.lang.String", Collection -> null)


getTypeArgumentNames

org.eclipse.jpt.common.utility.iterable.ListIterable<String> getTypeArgumentNames()
Return the fully qualified names of the type arguments, if any. The name for any type argument that is an array will contain the appropriate number of bracket pairs. The names will not include any further generic type arguments. (e.g. Foo> returns "barpackage.Bar", "int[]", "java.util.List"})


getTypeArgumentNamesSize

int getTypeArgumentNamesSize()

getTypeArgumentName

String getTypeArgumentName(int index)

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.