|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.bnd.compatibility.Signatures
public class Signatures
This class is compiled against 1.5 or later to provide access to the generic signatures. It can convert a Class, Field, Method or constructor to a generic signature and it can normalize a signature. Both are methods. Normalized signatures can be string compared and match even if the type variable names differ.
| Constructor Summary | |
|---|---|
Signatures()
|
|
| Method Summary | |
|---|---|
String |
getSignature(Class<?> c)
Calculate the generic signature of a Class. |
String |
getSignature(Constructor<?> c)
Calculate the generic signature of a Constructor. |
String |
getSignature(Field f)
Calculate the generic signature of a Field. |
String |
getSignature(Method m)
Calculate the generic signature of a Method. |
String |
getSignature(Object c)
Calculate the generic signature of a Class,Method,Field, or Constructor. |
boolean |
hasGenerics()
Check if the environment has generics, i.e. |
String |
normalize(String signature)
Normalize a signature to make sure the name of the variables are always the same. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Signatures()
| Method Detail |
|---|
public boolean hasGenerics()
throws Exception
Exception
public String getSignature(Object c)
throws Exception
f -
Exception
public String getSignature(Class<?> c)
throws Exception
class ::= declaration? reference reference*
f -
Exception
public String getSignature(Method m)
throws Exception
method ::= declaration? '(' reference* ')' reference
c -
Exception
public String getSignature(Constructor<?> c)
throws Exception
constructor ::= declaration? '(' reference* ')V'
c -
Exception
public String getSignature(Field f)
throws Exception
constructor ::= reference
c -
Exceptionpublic String normalize(String signature)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||