java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.field.FieldString
All Implemented Interfaces:
IDestructableField, IField

public class FieldString extends Object implements IDestructableField
Declares a Nd field of type string. Can be used in place of Field<String> in order to avoid extra GC overhead.
  • Field Details

    • RECORD_SIZE

      public static final int RECORD_SIZE
      See Also:
      Constant Field Values
    • offset

      protected int offset
  • Constructor Details

    • FieldString

      public FieldString(String structName, int fieldNumber)
  • Method Details

    • get

      public IString get(Nd nd, long address)
    • put

      public void put(Nd nd, long address, char[] newString)
    • put

      public void put(Nd nd, long address, String newString)
    • destruct

      public void destruct(Nd nd, long address)
      Specified by:
      destruct in interface IDestructableField
    • getRecordSize

      public int getRecordSize()
      Description copied from interface: IField
      Returns the size of the field, in bytes.
      Specified by:
      getRecordSize in interface IField
    • setFieldName

      protected final void setFieldName(String fieldName)
    • setOffset

      public final void setOffset(int offset)
      Description copied from interface: IField
      Sets the field offset (bytes from the start of the struct). This is invoked some time after field construction, after the sizes of all preceeding fields are known.
      Specified by:
      setOffset in interface IField
    • getOffset

      public final int getOffset()
      Description copied from interface: IField
      Returns the field offset, in bytes from the start of the struct.
      Specified by:
      getOffset in interface IField
    • getFieldName

      public final String getFieldName()
      Description copied from interface: IField
      Returns the name of the field. This is mainly used for error messages, debug output, and diagnostic tools. Meant to be programmer-readable but not user-readable.
      Specified by:
      getFieldName in interface IField