Class FieldSearchKey<T>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.field.FieldSearchKey<T>
- All Implemented Interfaces:
IDestructableField,IField
Represents a search key into a global search index.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T, B extends NdNode>
FieldSearchKey<T>create(StructDef<B> builder, FieldSearchIndex<B> searchIndex)Creates a search key attribute in the given struct which stores an entry in the given global search indexvoidReturns the name of the field.intReturns the field offset, in bytes from the start of the struct.intReturns the size of the field, in bytes.booleanReturns true iff this key is currently in the indexvoidSets the value of the key and inserts it into the index if it is not already presentvoidvoidremoveFromIndex(Nd nd, long address)Clears this key and removes it from the search indexprotected voidsetFieldName(String fieldName)voidsetOffset(int offset)Sets the field offset (bytes from the start of the struct).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aspectj.org.eclipse.jdt.internal.core.nd.field.IField
getAlignment
-
Field Details
-
offset
protected int offset
-
-
Method Details
-
create
public static <T, B extends NdNode> FieldSearchKey<T> create(StructDef<B> builder, FieldSearchIndex<B> searchIndex)Creates a search key attribute in the given struct which stores an entry in the given global search index -
put
-
put
Sets the value of the key and inserts it into the index if it is not already present -
get
-
destruct
- Specified by:
destructin interfaceIDestructableField
-
removeFromIndex
Clears this key and removes it from the search index -
isInIndex
Returns true iff this key is currently in the index -
getRecordSize
public int getRecordSize()Description copied from interface:IFieldReturns the size of the field, in bytes.- Specified by:
getRecordSizein interfaceIField
-
setFieldName
-
setOffset
public final void setOffset(int offset)Description copied from interface:IFieldSets 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. -
getOffset
public final int getOffset()Description copied from interface:IFieldReturns the field offset, in bytes from the start of the struct. -
getFieldName
Description copied from interface:IFieldReturns 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:
getFieldNamein interfaceIField
-