|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.core.BindingKey
Utility class to decode or create a binding key.
This class is not intended to be subclassed by clients.
IBinding.getKey()
Constructor Summary | |
---|---|
BindingKey(String key)
Creates a new binding key. |
Method Summary | |
---|---|
static String |
createArrayTypeBindingKey(String typeKey,
int arrayDimension)
Creates a new array type binding key from the given type binding key and the given array dimension. |
static String |
createParameterizedTypeBindingKey(String genericTypeKey,
String[] argumentTypeKeys)
Creates a new parameterized type binding key from the given generic type binding key and the given argument type binding keys. |
static String |
createTypeBindingKey(String typeName)
Creates a new type binding key from the given type name. |
static String |
createTypeVariableBindingKey(String typeVariableName,
String declaringKey)
Creates a new type variable binding key from the given type variable name and the given declaring key. |
static String |
createWilcardTypeBindingKey(String typeKey,
char kind)
Creates a new wildcard type binding key from the given type binding key and the given wildcard kind (one of Signature.C_STAR , Signature.C_SUPER , or Signature.C_EXTENDS .
|
String[] |
getTypeArguments()
Returns the type argument signatures of the element represented by this binding key. |
String |
internalToSignature()
Internal method. |
boolean |
isParameterizedMethod()
Returns whether this binding key represents a parameterized method, or if its declaring method is a parameterized method. |
boolean |
isParameterizedType()
Returns whether this binding key represents a parameterized type, or if its declaring type is a parameterized type. |
boolean |
isRawType()
Returns whether this binding key represents a raw type. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BindingKey(String key)
key
- the key to decodeMethod Detail |
public static String createArrayTypeBindingKey(String typeKey, int arrayDimension)
For example:
createArrayTypeBindingKey("Ljava/lang/Object;", 1) -> "[Ljava/lang/Object;"
createArrayTypeBindingKey("I", 2) -> "[[I"
typeKey
- the binding key of the given typearrayDimension
- the given array dimension
public static String createParameterizedTypeBindingKey(String genericTypeKey, String[] argumentTypeKeys)
For example:
createParameterizedTypeBindingKey("Ljava/util/Map;", new String[] {"Ljava/lang/String;", "Ljava/lang/Object;"}) -> "Ljava/util/Map;"
createParameterizedTypeBindingKey("Ljava/util/List;", new String[] {}) -> "Ljava/util/List<>;"
genericTypeKey
- the binding key of the generic typeargumentTypeKeys
- the possibly empty list of binding keys of argument types
public static String createTypeBindingKey(String typeName)
For example:
createTypeBindingKey("int") -> "I"
createTypeBindingKey("java.lang.String") -> "Ljava/lang/String;"
createTypeBindingKey("boolean[]") -> "[Z"
typeName
- the possibly qualified type name
public static String createTypeVariableBindingKey(String typeVariableName, String declaringKey)
For example:
createTypeVariableBindingKey("T", "Ljava/util/List;") -> "Ljava/util/List;:TT;"
createTypeVariableBindingKey("SomeTypeVariable", "Lp/X;.foo()V") -> "Lp/X;.foo()V:TSomeTypeVariable;"
typeVariableName
- the name of the given type variabledeclaringKey
- the binding key of the type or method the type variable belongs to
public static String createWilcardTypeBindingKey(String typeKey, char kind)
Signature.C_STAR
, Signature.C_SUPER
, or Signature.C_EXTENDS
.
If the wildcard is Signature.C_STAR
, the given type binding key is ignored.
For example:
createWilcardTypeBindingKey(null, Signature.C_STAR) -> "*"
createWilcardTypeBindingKey("Ljava/util/List;", Signature.C_SUPER) -> "-Ljava/util/List;"
createWilcardTypeBindingKey("Ljava/util/ArrayList;", Signature.C_EXTENDS) -> "+Ljava/util/ArrayList;"
typeKey
- the binding key of the given typekind
- one of Signature.C_STAR
, Signature.C_SUPER
, or Signature.C_EXTENDS
public String[] getTypeArguments()
public boolean isRawType()
public boolean isParameterizedType()
public boolean isParameterizedMethod()
public String internalToSignature()
This method transforms this binding key into a signature. This method is not intended to be called by clients.
public String toString()
|
Eclipse JDT Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |