Class PatternBlock
- java.lang.Object
-
- ghidra.app.plugin.processors.sleigh.pattern.PatternBlock
-
public class PatternBlock extends java.lang.ObjectA mask/value pair viewed as two bitstreams
-
-
Constructor Summary
Constructors Constructor Description PatternBlock(boolean tf)PatternBlock(int off, int msk, int val)PatternBlock(PatternBlock a, PatternBlock b)PatternBlock(java.util.ArrayList<?> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanalwaysFalse()booleanalwaysTrue()PatternBlockandBlock(PatternBlock b)java.lang.Objectclone()intgetLength()intgetMask(int startbit, int size)int[]getMaskVector()intgetNonZeroLength()intgetOffset()intgetValue(int startbit, int size)int[]getValueVector()byte[]getWholeBytes()Extract those portions of the pattern which constitute fully-specified bytesbooleanidentical(PatternBlock op2)booleanisContextMatch(ParserWalker walker)booleanisInstructionMatch(ParserWalker walker)voidrestoreXml(XmlPullParser parser)voidshift(int sa)booleanspecializes(PatternBlock op2)java.lang.StringtoString()
-
-
-
Field Detail
-
SHAMT
protected static final int SHAMT
- See Also:
- Constant Field Values
-
LEFT_BYTE
protected static final int LEFT_BYTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PatternBlock
public PatternBlock(int off, int msk, int val)
-
PatternBlock
public PatternBlock(boolean tf)
-
PatternBlock
public PatternBlock(PatternBlock a, PatternBlock b)
-
PatternBlock
public PatternBlock(java.util.ArrayList<?> list)
-
-
Method Detail
-
getMaskVector
public int[] getMaskVector()
-
getValueVector
public int[] getValueVector()
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
andBlock
public PatternBlock andBlock(PatternBlock b)
-
specializes
public boolean specializes(PatternBlock op2)
-
identical
public boolean identical(PatternBlock op2)
-
shift
public void shift(int sa)
-
getLength
public int getLength()
-
getMask
public int getMask(int startbit, int size)
-
getValue
public int getValue(int startbit, int size)
-
alwaysTrue
public boolean alwaysTrue()
-
alwaysFalse
public boolean alwaysFalse()
-
isInstructionMatch
public boolean isInstructionMatch(ParserWalker walker)
-
isContextMatch
public boolean isContextMatch(ParserWalker walker)
-
restoreXml
public void restoreXml(XmlPullParser parser)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getOffset
public int getOffset()
-
getNonZeroLength
public int getNonZeroLength()
-
getWholeBytes
public byte[] getWholeBytes()
Extract those portions of the pattern which constitute fully-specified bytes- Returns:
- an array of bytes
-
-