ptolemy.copernicus.java
Class ValueTag

java.lang.Object
  extended byptolemy.copernicus.java.ValueTag
All Implemented Interfaces:
soot.tagkit.Tag

public class ValueTag
extends java.lang.Object
implements soot.tagkit.Tag

A tag that references an object. This tag is usually used to store the constant runtime value of a field, if that value can be statically determined.

Since:
Ptolemy II 2.0
Version:
$Id: ValueTag.java,v 1.13 2004/04/13 05:12:21 cxh Exp $
Author:
Stephen Neuendorffer
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Constructor Summary
ValueTag(java.lang.Object object)
          Construct a new tag that refers to the given object.
 
Method Summary
static java.lang.Object getFieldObject(soot.SootField field)
          Return the object of the tag of the given field.
 java.lang.String getName()
          Return the name of the tag.
 java.lang.Object getObject()
          Return the value of the tag.
 byte[] getValue()
          Returns the tag raw data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueTag

public ValueTag(java.lang.Object object)
Construct a new tag that refers to the given object.

Method Detail

getName

public java.lang.String getName()
Return the name of the tag.

Specified by:
getName in interface soot.tagkit.Tag

getObject

public java.lang.Object getObject()
Return the value of the tag.


getValue

public byte[] getValue()
                throws soot.tagkit.AttributeValueException
Returns the tag raw data.

Specified by:
getValue in interface soot.tagkit.Tag
Throws:
soot.tagkit.AttributeValueException

getFieldObject

public static java.lang.Object getFieldObject(soot.SootField field)
Return the object of the tag of the given field. If the field does not have a value tag, then return null.