Class AbstractAssemblyResolution
- All Implemented Interfaces:
AssemblyResolution,Comparable<AssemblyResolution>
- Direct Known Subclasses:
DefaultAssemblyResolvedBackfill,DefaultAssemblyResolvedError,DefaultAssemblyResolvedPatterns
These may represent a successful construction (AssemblyResolvedPatterns, a future field
(AssemblyResolvedBackfill), or an error (AssemblyResolvedError).
This class also provides the static factory methods for constructing any of its subclasses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<AssemblyResolution> protected final Stringprotected final AbstractAssemblyResolutionFactory<?, ?> protected final AssemblyResolution -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory, String description, List<? extends AssemblyResolution> children, AssemblyResolution right) Construct a resolution -
Method Summary
Modifier and TypeMethodDescriptionprotected StringchildrenToString(String indent) Get the child portion oftoString()voidintcompareTo(AssemblyResolution that) protected abstract intprotected List<AssemblyResolution> getRight()booleanCheck if this record has childreninthashCode()abstract AssemblyResolutionshift(int amt) Shift the resolution's instruction pattern to the right, if applicabletoString()Used only by parents: get a multi-line description of this record, indentedGet this same resolution, but without any right siblingsabstract AssemblyResolutionwithRight(AssemblyResolution right) Get this same resolution, but with the given right siblingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.app.plugin.assembler.sleigh.sem.AssemblyResolution
isBackfill, isError, lineToString, parent
-
Field Details
-
factory
-
description
-
children
-
right
-
-
Constructor Details
-
AbstractAssemblyResolution
protected AbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory, String description, List<? extends AssemblyResolution> children, AssemblyResolution right) Construct a resolution- Parameters:
factory- the factorydescription- a textual description used as part oftoString()children- for record keeping, any children used in constructing this resolutionright- the right sibling
-
-
Method Details
-
hashCode
public int hashCode() -
computeHash
protected abstract int computeHash() -
getAllRight
-
collectAllRight
- Specified by:
collectAllRightin interfaceAssemblyResolution
-
childrenToString
Get the child portion oftoString()If a subclass has another, possible additional, notion of children that it would like to include in
toString(), it must override this method.- Parameters:
indent- the current indentation- Returns:
- the indented description for each child on its own line
- See Also:
-
toString
Description copied from interface:AssemblyResolutionUsed only by parents: get a multi-line description of this record, indented- Specified by:
toStringin interfaceAssemblyResolution- Parameters:
indent- the current indentation- Returns:
- the indented description
-
toString
Description copied from interface:AssemblyResolutionDescribe this record including indented children, grandchildren, etc., each on its own line.
- Specified by:
toStringin interfaceAssemblyResolution- Overrides:
toStringin classObject
-
compareTo
- Specified by:
compareToin interfaceComparable<AssemblyResolution>
-
hasChildren
public boolean hasChildren()Description copied from interface:AssemblyResolutionCheck if this record has childrenIf a subclass has another, possibly additional, notion of children that it would like to include in
AssemblyResolution.toString(), it must override this method to return true when such children are present.- Specified by:
hasChildrenin interfaceAssemblyResolution- Returns:
- true if this record has children
-
shift
Description copied from interface:AssemblyResolutionShift the resolution's instruction pattern to the right, if applicableThis also shifts any backfill and forbidden pattern records.
- Specified by:
shiftin interfaceAssemblyResolution- Parameters:
amt- the number of bytes to shift.- Returns:
- the result
-
withoutRight
Get this same resolution, but without any right siblings- Returns:
- the resolution
-
withRight
Get this same resolution, but with the given right sibling- Parameters:
right- the right sibling- Returns:
- the resolution
-
getDescription
- Specified by:
getDescriptionin interfaceAssemblyResolution
-
getChildren
- Specified by:
getChildrenin interfaceAssemblyResolution
-
getRight
- Specified by:
getRightin interfaceAssemblyResolution
-