Enum Class PrimitiveTraceObjectSchema
- All Implemented Interfaces:
TraceObjectSchema,Serializable,Comparable<PrimitiveTraceObjectSchema>,Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface ghidra.trace.model.target.schema.TraceObjectSchema
TraceObjectSchema.AttributeSchema, TraceObjectSchema.Hidden, TraceObjectSchema.Private, TraceObjectSchema.SchemaName -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe top-most type descriptorThe least restrictive, but least informative object schema.A type so restrictive nothing can satisfy it. -
Method Summary
Modifier and TypeMethodDescriptionGet the map of attribute name aliasesGet the map of attribute names to named schemasGet the context of which this schema is a memberGet the default schema for attributesGet the default schema for elementsGet the map of element indices to named schemasSet<Class<? extends TraceObjectInterface>> Get the minimum interfaces supported by a conforming objectgetName()Get the name of this schemaClass<?> getType()Get the Java class that best represents this type.getTypes()booleanCheck if this object is the canonical container for its elementsstatic TraceObjectSchema.SchemaNamenameForPrimitive(Class<?> cls) Get the name of a suitable enumerable schema for a given Java classstatic PrimitiveTraceObjectSchemaschemaForPrimitive(Class<?> cls) Get a suitable schema for a given Java primitive classsearchFor(Class<? extends TraceObjectInterface> type, boolean requireCanonical) Do the same asTraceObjectSchema.searchFor(Class, KeyPath, boolean)with an empty prefixsearchForCanonicalContainer(Class<? extends TraceObjectInterface> type) Find the (sub) path to the canonical container for objects implementing a given interfacesearchForSuitable(Class<? extends TraceObjectInterface> type, KeyPath path) Search for a suitable object with this schema at the given pathstatic PrimitiveTraceObjectSchemaReturns the enum constant of this class with the specified name.static PrimitiveTraceObjectSchema[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface ghidra.trace.model.target.schema.TraceObjectSchema
checkAliasedAttribute, computeFrameLevel, filterForSuitable, getAttributeSchema, getChildSchema, getChildSchemaName, getElementSchema, getSuccessorSchema, getSuccessorSchemas, isAssignableFrom, isHidden, searchFor, searchForAncestor, searchForAncestorContainer, searchForRegisterContainer, searchForSuitable, searchForSuitableContainer, validateRequiredAttributes, validateTypeAndInterfaces
-
Enum Constant Details
-
ANY
The top-most type descriptorThe described value can be any primitive or a
TraceObject. -
OBJECT
The least restrictive, but least informative object schema.This requires nothing more than the described value to be a
TraceObject. -
TYPE
-
VOID
A type so restrictive nothing can satisfy it.This is how a schema specifies that a particular key is not allowed. It is commonly used as the default attribute when only certain enumerated attributes are allowed. It is also used as the type for the children of primitives, since primitives cannot have successors.
-
BOOL
-
BYTE
-
SHORT
-
INT
-
LONG
-
STRING
-
ADDRESS
-
RANGE
-
EXECUTION_STATE
-
MAP_PARAMETERS
-
CHAR
-
BOOL_ARR
-
BYTE_ARR
-
CHAR_ARR
-
SHORT_ARR
-
INT_ARR
-
LONG_ARR
-
STRING_ARR
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
schemaForPrimitive
Get a suitable schema for a given Java primitive classThe term "primitive" here is used in terms of object schemas, not in terms of Java types.
- Parameters:
cls- the class, which may or may not be the boxed form- Returns:
- the schema or null if no schema is suitable
-
nameForPrimitive
Get the name of a suitable enumerable schema for a given Java class- Parameters:
cls- the class, which may or may no be the boxed form- Returns:
- the name or null if no schema is suitable
- See Also:
-
getContext
Description copied from interface:TraceObjectSchemaGet the context of which this schema is a memberAll schema names are resolved in this same context
- Specified by:
getContextin interfaceTraceObjectSchema- Returns:
- the context
-
getName
Description copied from interface:TraceObjectSchemaGet the name of this schema- Specified by:
getNamein interfaceTraceObjectSchema- Returns:
- the name
-
getType
Description copied from interface:TraceObjectSchemaGet the Java class that best represents this type.Note that this is either a primitive, or
TraceObject. Even though an object implementation is necessarily a sub-type ofTraceObject, for any object schema, this returnTraceObject. Information about a "sub-type" of object is communicated via interfaces, element schemas, and attribute schemas.- Specified by:
getTypein interfaceTraceObjectSchema- Returns:
- the Java class for this type
-
getTypes
-
getInterfaces
Description copied from interface:TraceObjectSchemaGet the minimum interfaces supported by a conforming object- Specified by:
getInterfacesin interfaceTraceObjectSchema- Returns:
- the set of required interfaces
-
isCanonicalContainer
public boolean isCanonicalContainer()Description copied from interface:TraceObjectSchemaCheck if this object is the canonical container for its elementsThis is generally in reference to the default type of this object's elements. For example, if elements of this object are all expected to support the "Process" interface, then this is the canonical Process container. Any Process ought to have a (canonical) path in this container. Any other path referring to such a Process ought to be a link.
NOTE: the concept of links is still in incubation, as some native debugging APIs seem to have made it difficult to detect object identity. Additionally, it's possible a caller's first encounter with an object is not via its canonical path, and it may be difficult to assign a path having only the native-API-given object in hand.
- Specified by:
isCanonicalContainerin interfaceTraceObjectSchema- Returns:
- true if this is a canonical container, false otherwise
-
getElementSchemas
Description copied from interface:TraceObjectSchemaGet the map of element indices to named schemasIt is uncommon for this map to be populated, since the elements of a given container are typically uniform in type. Nevertheless, there can be restrictions imposed on -- and information provided for -- specific indices.
- Specified by:
getElementSchemasin interfaceTraceObjectSchema- Returns:
- the map
-
getDefaultElementSchema
Description copied from interface:TraceObjectSchemaGet the default schema for elementsSince elements of a given container are typically uniform in type, this is the primary means of specifying element schemas.
- Specified by:
getDefaultElementSchemain interfaceTraceObjectSchema- Returns:
- the default named schema
-
getAttributeSchemas
Description copied from interface:TraceObjectSchemaGet the map of attribute names to named schemasThe returned map will include aliases. To determine whether or not an attribute key is an alias, check whether the entry's key matches the name of the attribute (see
TraceObjectSchema.AttributeSchema.getName()). It is possible the schema's name is empty, i.e., the default schema. This indicates an alias to a key that was not named in the schema. UseTraceObjectSchema.getAttributeAliases()to determine the name of that key.- Specified by:
getAttributeSchemasin interfaceTraceObjectSchema- Returns:
- the map
-
getAttributeAliases
Description copied from interface:TraceObjectSchemaGet the map of attribute name aliasesThe returned map must provide the direct alias names. For any given key, the client need only query the map once to determine the name of the attribute to which the alias refers. Consequently, the map also cannot indicate a cycle.
An aliased attribute takes the value of its target implicitly.
- Specified by:
getAttributeAliasesin interfaceTraceObjectSchema- Returns:
- the map
-
getDefaultAttributeSchema
Description copied from interface:TraceObjectSchemaGet the default schema for attributesSince the expected attributes and their respective schemas are generally enumerated, this most commonly returns
TraceObjectSchema.AttributeSchema.DEFAULT_ANY, to allow unrestricted use of additional attributes, orTraceObjectSchema.AttributeSchema.DEFAULT_VOID, to forbid any additional attributes.- Specified by:
getDefaultAttributeSchemain interfaceTraceObjectSchema- Returns:
- the default attribute schema
-
searchFor
Description copied from interface:TraceObjectSchemaDo the same asTraceObjectSchema.searchFor(Class, KeyPath, boolean)with an empty prefix- Specified by:
searchForin interfaceTraceObjectSchema- Parameters:
type- the sub-type ofTraceObjectInterfaceto search forrequireCanonical- only return patterns matching a canonical location for the type- Returns:
- a set of patterns where such objects could be found
-
searchForCanonicalContainer
Description copied from interface:TraceObjectSchemaFind the (sub) path to the canonical container for objects implementing a given interfaceIf more than one container is found having the shortest path, then
nullis returned.- Specified by:
searchForCanonicalContainerin interfaceTraceObjectSchema- Parameters:
type- the sub-type ofTraceObjectInterfaceto search for- Returns:
- the single path to that container
-
searchForSuitable
Description copied from interface:TraceObjectSchemaSearch for a suitable object with this schema at the given path- Specified by:
searchForSuitablein interfaceTraceObjectSchema- Parameters:
type- the type of object soughtpath- the path of a seed object- Returns:
- the expected path of the suitable object, or null
-