Class PrimitiveExtractor
java.lang.Object
ghidra.program.model.lang.protorules.PrimitiveExtractor
-
Constructor Details
-
PrimitiveExtractor
- Parameters:
dt
- is data-type extract fromunionIllegal
- is true if unions encountered during extraction are considered illegaloffset
- is the starting offset to associate with the data-typemax
- is the maximum number of primitives to extract before giving up
-
-
Method Details
-
isValid
public boolean isValid()- Returns:
- true if all primitive elements were extracted
-
containsUnknown
public boolean containsUnknown()- Returns:
- true if any extracted element was unknown/undefined
-
isAligned
public boolean isAligned()- Returns:
- true if all extracted elements are aligned
-
containsHoles
public boolean containsHoles()- Returns:
- true if there is extra space in the data-type that is not alignment padding
-
size
public int size()- Returns:
- the number of primitives extracted
-
get
Get the i-th extracted primitive and its offset- Parameters:
i
- is the index- Returns:
- the primitive and offset
-