Package ghidra.program.model.lang.protorules

# Class HomogeneousAggregate

java.lang.Object
ghidra.program.model.lang.protorules.SizeRestrictedFilter
ghidra.program.model.lang.protorules.HomogeneousAggregate

All Implemented Interfaces:
  `DatatypeFilter`

public class HomogeneousAggregate extends SizeRestrictedFilter
Filter on a homogeneous aggregate data-type All primitive data-types must be the same.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_PRIMITIVES`
  `static final String`
  `NAME_FLOAT4`

  ### Fields inherited from class ghidra.program.model.lang.protorules.SizeRestrictedFilter

  `maxSize, minSize, NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HomogeneousAggregate(String nm, int meta)`
  Constructor for use with decode()
  `HomogeneousAggregate(String nm, int meta, int maxPrim, int min, int max)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DatatypeFilter`
  `clone()`
  Make a copy of this filter
  `void`
  `encode(Encoder encoder)`
  Encode this filter and its configuration to a stream
  `boolean`
  `filter(DataType dt)`
  Test whether the given data-type belongs to this filter's data-type class
  `void`
  `restoreXml(XmlPullParser parser)`
  Configure details of the data-type class being filtered from the given stream

  ### Methods inherited from class ghidra.program.model.lang.protorules.SizeRestrictedFilter

  `encodeAttributes, filterOnSize, isEquivalent, restoreAttributesXml`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### NAME_FLOAT4

    public static final String NAME_FLOAT4
    See Also:
      - Constant Field Values

  - ### MAX_PRIMITIVES

    public static final int MAX_PRIMITIVES
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### HomogeneousAggregate

    public HomogeneousAggregate(String nm, int meta)
    Constructor for use with decode()
    Parameters:
      `nm` - is the name attribute associated with the tag
      `meta` - is the expected element meta-type

  - ### HomogeneousAggregate

    public HomogeneousAggregate(String nm, int meta, int maxPrim, int min, int max)

- ## Method Details

  - ### clone

    public DatatypeFilter clone()
    Description copied from interface: `DatatypeFilter`
    Make a copy of this filter
    Specified by:
      `clone` in interface `DatatypeFilter`
    Overrides:
      `clone` in class `SizeRestrictedFilter`
    Returns:
      the new copy

  - ### filter

    public boolean filter(DataType dt)
    Description copied from interface: `DatatypeFilter`
    Test whether the given data-type belongs to this filter's data-type class
    Specified by:
      `filter` in interface `DatatypeFilter`
    Overrides:
      `filter` in class `SizeRestrictedFilter`
    Parameters:
      `dt` - is the given data-type to test
    Returns:
      true if the data-type is in the class, false otherwise

  - ### encode

    public void encode(Encoder encoder) throws IOException
    Description copied from interface: `DatatypeFilter`
    Encode this filter and its configuration to a stream
    Specified by:
      `encode` in interface `DatatypeFilter`
    Overrides:
      `encode` in class `SizeRestrictedFilter`
    Parameters:
      `encoder` - is the stream encoder
    Throws:
      `IOException` - for problems writing to the stream

  - ### restoreXml

    public void restoreXml(XmlPullParser parser) throws XmlParseException
    Description copied from interface: `DatatypeFilter`
    Configure details of the data-type class being filtered from the given stream
    Specified by:
      `restoreXml` in interface `DatatypeFilter`
    Overrides:
      `restoreXml` in class `SizeRestrictedFilter`
    Parameters:
      `parser` - is the given stream decoder
    Throws:
      `XmlParseException` - if there are problems with the stream