Package ghidra.util.database
Class DBCachedObjectStoreFactory.VariantDBFieldCodec<OT extends DBAnnotatedObject>
java.lang.Object
ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec<Object,OT,BinaryField>
ghidra.util.database.DBCachedObjectStoreFactory.VariantDBFieldCodec<OT>
- All Implemented Interfaces:
DBCachedObjectStoreFactory.DBFieldCodec<Object,OT, BinaryField>
- Enclosing class:
DBCachedObjectStoreFactory
public static class DBCachedObjectStoreFactory.VariantDBFieldCodec<OT extends DBAnnotatedObject>
extends DBCachedObjectStoreFactory.AbstractDBFieldCodec<Object,OT,BinaryField>
A custom codec for field of "variant" type
This is suitable for use on fields of type Object; however, only certain types can
actually be encoded. The encoding uses a 1-byte type selector followed by the byte-array
encoded value.
-
Field Summary
Fields inherited from class ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec
column, field, fieldType, objectType, valueType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectprotected voidSame asDBCachedObjectStoreFactory.AbstractDBFieldCodec.load(DBAnnotatedObject, DBRecord), but permits exceptionsprotected voidSame asDBCachedObjectStoreFactory.AbstractDBFieldCodec.store(DBAnnotatedObject, DBRecord), but permits exceptionsprotected byte[]protected DBCachedObjectStoreFactory.PrimitiveCodec<?> getPrimitiveCodec(Class<?> cls) protected DBCachedObjectStoreFactory.PrimitiveCodec<?> getPrimitiveCodec(OT obj, byte sel) voidstore(Object value, BinaryField f) Encode the given field value into the given fieldMethods inherited from class ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec
getFieldType, getObjectType, getValue, getValueType, load, setValue, storeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.util.database.DBCachedObjectStoreFactory.DBFieldCodec
encodeField
-
Constructor Details
-
VariantDBFieldCodec
-
-
Method Details
-
getPrimitiveCodec
-
getPrimitiveCodec
-
encode
-
decode
-
store
Description copied from interface:DBCachedObjectStoreFactory.DBFieldCodecEncode the given field value into the given field- Parameters:
value- the valuef- the field
-
doStore
protected void doStore(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException Description copied from class:DBCachedObjectStoreFactory.AbstractDBFieldCodecSame asDBCachedObjectStoreFactory.AbstractDBFieldCodec.store(DBAnnotatedObject, DBRecord), but permits exceptions- Specified by:
doStorein classDBCachedObjectStoreFactory.AbstractDBFieldCodec<Object,OT extends DBAnnotatedObject, BinaryField> - Throws:
IllegalArgumentExceptionIllegalAccessException
-
doLoad
protected void doLoad(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException Description copied from class:DBCachedObjectStoreFactory.AbstractDBFieldCodecSame asDBCachedObjectStoreFactory.AbstractDBFieldCodec.load(DBAnnotatedObject, DBRecord), but permits exceptions- Specified by:
doLoadin classDBCachedObjectStoreFactory.AbstractDBFieldCodec<Object,OT extends DBAnnotatedObject, BinaryField> - Throws:
IllegalArgumentExceptionIllegalAccessException
-