Class MetaTypeFilter
java.lang.Object
ghidra.program.model.lang.protorules.SizeRestrictedFilter
ghidra.program.model.lang.protorules.MetaTypeFilter
- All Implemented Interfaces:
DatatypeFilter
Filter on a single meta data-type. Filters on TYPE_STRUCT or TYPE_FLOAT etc.
Additional filtering on size of the data-type can be configured.
-
Field Summary
FieldsFields inherited from class ghidra.program.model.lang.protorules.SizeRestrictedFilter
maxSize, minSize, NAME -
Constructor Summary
ConstructorsConstructorDescriptionMetaTypeFilter(int meta) Constructor for use with decode().MetaTypeFilter(int meta, int min, int max) Constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()Make a copy of this filtervoidEncode this filter and its configuration to a streambooleanTest whether the given data-type belongs to this filter's data-type classbooleanTest if the given filter is configured and performs identically to thisvoidrestoreXml(XmlPullParser parser) Configure details of the data-type class being filtered from the given streamMethods inherited from class ghidra.program.model.lang.protorules.SizeRestrictedFilter
encodeAttributes, filterOnSize, restoreAttributesXml
-
Field Details
-
metaType
protected int metaType
-
-
Constructor Details
-
MetaTypeFilter
public MetaTypeFilter(int meta) Constructor for use with decode().- Parameters:
meta- is the data-type metatype to filter on
-
MetaTypeFilter
public MetaTypeFilter(int meta, int min, int max) Constructor- Parameters:
meta- is the data-type metatype to filter onmin- is the minimum size in bytesmax- is the maximum size in bytes
-
-
Method Details
-
isEquivalent
Description copied from interface:DatatypeFilterTest if the given filter is configured and performs identically to this- Specified by:
isEquivalentin interfaceDatatypeFilter- Overrides:
isEquivalentin classSizeRestrictedFilter- Parameters:
op- is the given filter- Returns:
- true if the two filters are equivalent
-
clone
Description copied from interface:DatatypeFilterMake a copy of this filter- Specified by:
clonein interfaceDatatypeFilter- Overrides:
clonein classSizeRestrictedFilter- Returns:
- the new copy
-
filter
Description copied from interface:DatatypeFilterTest whether the given data-type belongs to this filter's data-type class- Specified by:
filterin interfaceDatatypeFilter- Overrides:
filterin classSizeRestrictedFilter- Parameters:
dt- is the given data-type to test- Returns:
- true if the data-type is in the class, false otherwise
-
encode
Description copied from interface:DatatypeFilterEncode this filter and its configuration to a stream- Specified by:
encodein interfaceDatatypeFilter- Overrides:
encodein classSizeRestrictedFilter- Parameters:
encoder- is the stream encoder- Throws:
IOException- for problems writing to the stream
-
restoreXml
Description copied from interface:DatatypeFilterConfigure details of the data-type class being filtered from the given stream- Specified by:
restoreXmlin interfaceDatatypeFilter- Overrides:
restoreXmlin classSizeRestrictedFilter- Parameters:
parser- is the given stream decoder- Throws:
XmlParseException- if there are problems with the stream
-