|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.annotations.CrystalAnnotation
public class CrystalAnnotation
The simplest kind of ICrystalAnnotation. It simply maps all parameters to an object. If you would instead like to do more advanced parsing of an annotation, you must create your own ICrystalAnnotation.
Constructor Summary | |
---|---|
CrystalAnnotation()
|
|
CrystalAnnotation(String name)
|
Method Summary | |
---|---|
String |
getName()
Returns the fully qualified name of the original annotation class used in the source. |
Object |
getObject(String key)
Returns the value of an annotation parameter with the given name. |
void |
setName(String name)
The annotation database will use this method to populate the fully qualified name of the original annotation class. |
void |
setObject(String key,
Object value)
The annotation database will use this method to populate the explicit and implicit parameters of an annotation instance present in the analyzed source code. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CrystalAnnotation(String name)
public CrystalAnnotation()
Method Detail |
---|
public String getName()
ICrystalAnnotation
getName
in interface ICrystalAnnotation
public void setName(String name)
ICrystalAnnotation
setName
in interface ICrystalAnnotation
name
- The fully qualified name of the original annotation class used in the source.ICrystalAnnotation.getName()
public Object getObject(String key)
ICrystalAnnotation
ITypeBinding
for the class objectIVariableBinding
for the enum constantICrystalAnnotation
Object[]
whose elements are as per above (the language
only allows single dimensional arrays in annotations)
getObject
in interface ICrystalAnnotation
key
- Name of the annotation parameter, e.g., "value".
null
if
the parameter is unknown.IMemberValuePairBinding.getValue()
public void setObject(String key, Object value)
ICrystalAnnotation
ICrystalAnnotation.getObject(String)
setObject
in interface ICrystalAnnotation
key
- Parameter name.value
- Parameter value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |