Package ghidra.trace.database.property
Class DBTraceAddressPropertyManager
java.lang.Object
ghidra.trace.database.property.DBTraceAddressPropertyManager
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,TraceAddressPropertyManager
public class DBTraceAddressPropertyManager
extends Object
implements TraceAddressPropertyManager, DBTraceManager
TODO: Document me
TODO: This is public for user properties, i.e.,
ProgramUserData, but encapsulated for
trace properties-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TraceAddressPropertyManagerprotected final Languageprotected final DBHandleprotected final ReadWriteLockprotected final Map<String, AbstractDBTracePropertyMap<?, ?>> protected final DBTraceThreadManagerprotected final DBTrace -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceAddressPropertyManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager) -
Method Summary
Modifier and TypeMethodDescription<T> AbstractDBTracePropertyMap<T, ?> createPropertyMap(String name, Class<T> valueClass) Create a property map with the given name having the given typevoidNotification that an IO exception occurred.protected <T> AbstractDBTracePropertyMap<T, ?> doCreateMap(String name, OpenMode openMode, Class<T> valueClass) Get a copy of all the defined properties<T> AbstractDBTracePropertyMap<T, ?> getOrCreatePropertyMap(String name, Class<T> valueClass) Get the property map with the given name, creating it if necessary, of the given type<T> TracePropertyMap<? super T> getOrCreatePropertyMapSuper(String name, Class<T> valueClass) Get the property map with the given name, creating it if necessary, of the given typegetPropertyMap(String name) Get the property map with the given name.<T> AbstractDBTracePropertyMap<T, ?> getPropertyMap(String name, Class<T> valueClass) Get the property map with the given name, if it has the given type<T> TracePropertyMap<? extends T> getPropertyMapExtends(String name, Class<T> valueClass) Get the property map with the given name, if its values extend the given typevoidinvalidateCache(boolean all) Invalidate this manager's caches
-
Field Details
-
dbh
-
lock
-
baseLanguage
-
trace
-
threadManager
-
propertyStore
protected final DBCachedObjectStore<DBTraceAddressPropertyManager.DBTraceAddressPropertyEntry> propertyStore -
propertyMapsByName
-
apiView
-
-
Constructor Details
-
DBTraceAddressPropertyManager
public DBTraceAddressPropertyManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager) throws VersionException, IOException - Throws:
VersionExceptionIOException
-
-
Method Details
-
doCreateMap
protected <T> AbstractDBTracePropertyMap<T,?> doCreateMap(String name, OpenMode openMode, Class<T> valueClass) -
createPropertyMap
public <T> AbstractDBTracePropertyMap<T,?> createPropertyMap(String name, Class<T> valueClass) throws DuplicateNameException Description copied from interface:TraceAddressPropertyManagerCreate a property map with the given name having the given typeThe following types are supported for valueClass:
IntegerLongStringVoid: presence or absence of entry satisfies "boolean" use case? extendsSaveable
Note that for maps of user-defined
Saveabletype, only the specified type is accepted by the map. Attempting to save an extension of that type may lead to undefined behavior, esp., if it attempts to save additional fields. When the value is restored, it will have the type given invalueClass, not the extended type.- Specified by:
createPropertyMapin interfaceTraceAddressPropertyManager- Parameters:
name- the namevalueClass- the type of values- Returns:
- the new property map
- Throws:
DuplicateNameException- if a map of the given name already exists
-
getPropertyMap
Description copied from interface:TraceAddressPropertyManagerGet the property map with the given name, if it has the given type- Specified by:
getPropertyMapin interfaceTraceAddressPropertyManager- Parameters:
name- the namevalueClass- the expected type of values- Returns:
- the property map, or null if it does not exist
-
getPropertyMapExtends
Description copied from interface:TraceAddressPropertyManagerGet the property map with the given name, if its values extend the given type- Specified by:
getPropertyMapExtendsin interfaceTraceAddressPropertyManager- Parameters:
name- the namevalueClass- the expected type of values- Returns:
- the property map, or null if it does not exist
-
getOrCreatePropertyMap
Description copied from interface:TraceAddressPropertyManagerGet the property map with the given name, creating it if necessary, of the given type- Specified by:
getOrCreatePropertyMapin interfaceTraceAddressPropertyManager- Parameters:
name- the namevalueClass- the expected type of values- Returns:
- the (possibly new) property map
- See Also:
-
getOrCreatePropertyMapSuper
public <T> TracePropertyMap<? super T> getOrCreatePropertyMapSuper(String name, Class<T> valueClass) Description copied from interface:TraceAddressPropertyManagerGet the property map with the given name, creating it if necessary, of the given typeIf the map already exists, then its values' type must be a super type of that given.
- Specified by:
getOrCreatePropertyMapSuperin interfaceTraceAddressPropertyManager- Parameters:
name- the namevalueClass- the expected type of values- Returns:
- the (possibly new) property map
- See Also:
-
getPropertyMap
Description copied from interface:TraceAddressPropertyManagerGet the property map with the given name.Note that no type checking is performed (there is no
valueClassparameter). Thus, the returned map is suitable only for clearing and querying where the property is present. The caller may perform run-time type checking via theTracePropertyMapOperations.getValueClass()method.- Specified by:
getPropertyMapin interfaceTraceAddressPropertyManager- Parameters:
name- the name- Returns:
- the property map
-
getAllProperties
Description copied from interface:TraceAddressPropertyManagerGet a copy of all the defined properties- Specified by:
getAllPropertiesin interfaceTraceAddressPropertyManager- Returns:
- the set of names
-
dbError
Description copied from interface:ErrorHandlerNotification that an IO exception occurred.- Specified by:
dbErrorin interfaceErrorHandler- Parameters:
e-IOExceptionwhich was cause of error
-
invalidateCache
public void invalidateCache(boolean all) Description copied from interface:DBTraceManagerInvalidate this manager's caches- Specified by:
invalidateCachein interfaceDBTraceManager- Parameters:
all- probably nothing. Check out implementations ofManagerDB.invalidateCache(boolean).
-
getApiPropertyManager
-