edu.cmu.cs.crystal.annotations
Class CrystalAnnotation

java.lang.Object
  extended by edu.cmu.cs.crystal.annotations.CrystalAnnotation
All Implemented Interfaces:
ICrystalAnnotation

public class CrystalAnnotation
extends Object
implements ICrystalAnnotation

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.

Since:
Crystal 3.4.0
Author:
ciera

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

CrystalAnnotation

public CrystalAnnotation(String name)

CrystalAnnotation

public CrystalAnnotation()
Method Detail

getName

public String getName()
Description copied from interface: ICrystalAnnotation
Returns the fully qualified name of the original annotation class used in the source.

Specified by:
getName in interface ICrystalAnnotation
Returns:
The fully qualified name of the original annotation class used in the source.

setName

public void setName(String name)
Description copied from interface: ICrystalAnnotation
The annotation database will use this method to populate the fully qualified name of the original annotation class.

Specified by:
setName in interface ICrystalAnnotation
Parameters:
name - The fully qualified name of the original annotation class used in the source.
See Also:
ICrystalAnnotation.getName()

getObject

public Object getObject(String key)
Description copied from interface: ICrystalAnnotation
Returns the value of an annotation parameter with the given name. Values are represented as follows:

Specified by:
getObject in interface ICrystalAnnotation
Parameters:
key - Name of the annotation parameter, e.g., "value".
Returns:
The value of an annotation parameter with the given name or null if the parameter is unknown.
See Also:
IMemberValuePairBinding.getValue()

setObject

public void setObject(String key,
                      Object value)
Description copied from interface: ICrystalAnnotation
The annotation database will use this method to populate the explicit and implicit parameters of an annotation instance present in the analyzed source code. The values set must conform to the rules for representing parameter values described in ICrystalAnnotation.getObject(String)

Specified by:
setObject in interface ICrystalAnnotation
Parameters:
key - Parameter name.
value - Parameter value.