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
Fields inherited from class ghidra.program.model.lang.protorules.SizeRestrictedFilter
maxSize, minSize, NAME
-
Constructor Summary
ConstructorDescriptionMetaTypeFilter
(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 filtervoid
Encode this filter and its configuration to a streamboolean
Test whether the given data-type belongs to this filter's data-type classboolean
Test if the given filter is configured and performs identically to thisvoid
restoreXml
(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:DatatypeFilter
Test if the given filter is configured and performs identically to this- Specified by:
isEquivalent
in interfaceDatatypeFilter
- Overrides:
isEquivalent
in classSizeRestrictedFilter
- Parameters:
op
- is the given filter- Returns:
- true if the two filters are equivalent
-
clone
Description copied from interface:DatatypeFilter
Make a copy of this filter- Specified by:
clone
in interfaceDatatypeFilter
- Overrides:
clone
in classSizeRestrictedFilter
- Returns:
- the new copy
-
filter
Description copied from interface:DatatypeFilter
Test whether the given data-type belongs to this filter's data-type class- Specified by:
filter
in interfaceDatatypeFilter
- Overrides:
filter
in 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:DatatypeFilter
Encode this filter and its configuration to a stream- Specified by:
encode
in interfaceDatatypeFilter
- Overrides:
encode
in classSizeRestrictedFilter
- Parameters:
encoder
- is the stream encoder- Throws:
IOException
- for problems writing to the stream
-
restoreXml
Description copied from interface:DatatypeFilter
Configure details of the data-type class being filtered from the given stream- Specified by:
restoreXml
in interfaceDatatypeFilter
- Overrides:
restoreXml
in classSizeRestrictedFilter
- Parameters:
parser
- is the given stream decoder- Throws:
XmlParseException
- if there are problems with the stream
-