tom.library.adt.bytecode.types.instruction
Class Ishl

java.lang.Object
  extended by tom.library.adt.bytecode.BytecodeAbstractType
      extended by tom.library.adt.bytecode.types.Instruction
          extended by tom.library.adt.bytecode.types.instruction.Ishl
All Implemented Interfaces:
Comparable, shared.SharedObject, shared.SharedObjectWithID, Visitable

public final class Ishl
extends Instruction
implements Visitable


Nested Class Summary
 
Nested classes/interfaces inherited from class tom.library.adt.bytecode.BytecodeAbstractType
BytecodeAbstractType.AddLabel, BytecodeAbstractType.CollectAndRemoveLabels, BytecodeAbstractType.CollectLabels, BytecodeAbstractType.CollectPositionsOfLabels, BytecodeAbstractType.CollectRef, BytecodeAbstractType.CollectSubtermAccess, BytecodeAbstractType.CollectSubtermAccessList, BytecodeAbstractType.CollectSubtermClassInfo, BytecodeAbstractType.CollectSubtermClassNode, BytecodeAbstractType.CollectSubtermField, BytecodeAbstractType.CollectSubtermFieldDescriptor, BytecodeAbstractType.CollectSubtermFieldDescriptorList, BytecodeAbstractType.CollectSubtermFieldList, BytecodeAbstractType.CollectSubtermHandler, BytecodeAbstractType.CollectSubtermInnerClassInfo, BytecodeAbstractType.CollectSubtermInnerClassInfoList, BytecodeAbstractType.CollectSubtermInstruction, BytecodeAbstractType.CollectSubtermInstructionList, BytecodeAbstractType.CollectSubtermIntList, BytecodeAbstractType.CollectSubtermLabelNode, BytecodeAbstractType.CollectSubtermLabelNodeList, BytecodeAbstractType.CollectSubtermLocalVariable, BytecodeAbstractType.CollectSubtermLocalVariableList, BytecodeAbstractType.CollectSubtermMethod, BytecodeAbstractType.CollectSubtermMethodCode, BytecodeAbstractType.CollectSubtermMethodDescriptor, BytecodeAbstractType.CollectSubtermMethodInfo, BytecodeAbstractType.CollectSubtermMethodList, BytecodeAbstractType.CollectSubtermOuterClassInfo, BytecodeAbstractType.CollectSubtermReturnDescriptor, BytecodeAbstractType.CollectSubtermSignature, BytecodeAbstractType.CollectSubtermStringList, BytecodeAbstractType.CollectSubtermTryCatchBlock, BytecodeAbstractType.CollectSubtermTryCatchBlockList, BytecodeAbstractType.CollectSubtermTypeNode, BytecodeAbstractType.CollectSubtermValue, BytecodeAbstractType.GlobalRedirection, BytecodeAbstractType.Info, BytecodeAbstractType.Label2Path, BytecodeAbstractType.Normalize, BytecodeAbstractType.NormalizeLabel, BytecodeAbstractType.UpdatePos
 
Field Summary
 
Fields inherited from class tom.library.adt.bytecode.types.Instruction
idConv
 
Fields inherited from class tom.library.adt.bytecode.BytecodeAbstractType
atermFactory, factory
 
Method Summary
 int compareTo(Object o)
          Compares two terms.
 int compareToLPO(Object o)
          Compares two terms.
 shared.SharedObject duplicate()
          Copy the object and returns the copy
 boolean equivalent(shared.SharedObject obj)
          Checks if a SharedObject is equivalent to the current object
static Instruction fromTerm(aterm.ATerm trm, ATermConverter atConv)
          Apply a conversion on the ATerm contained in the String and returns a tom.library.adt.bytecode.types.Instruction from it
 Visitable getChildAt(int index)
          Returns the child at the specified index
 int getChildCount()
          Returns the number of childs of the term
 Visitable[] getChildren()
          Returns the whole children of the term
 int hashCode()
          Returns hashCode
protected static int hashFunction()
          Compute a hashcode for this term.
 boolean isIshl()
          Returns true if the term is rooted by the symbol Ishl
static Ishl make()
          Constructor that builds a term rooted by Ishl
 Visitable setChildAt(int index, Visitable v)
          Set the child at the specified index
 Visitable setChildren(Visitable[] childs)
          Set children to the term
 String symbolName()
          Returns the name of the symbol
 aterm.ATerm toATerm()
          Returns an ATerm representation of this term.
 void toStringBuilder(StringBuilder buffer)
          Appends a string representation of this term to the buffer given as argument.
 
Methods inherited from class tom.library.adt.bytecode.types.Instruction
fromStream, fromStream, fromString, fromString, fromTerm, getCollectionPathInstruction, getcst, getdflt, getdims, getfieldDesc, getHeadPathInstruction, getincr, getkeys, getlabel, getlabelInstruction, getlabels, getmax, getmethodDesc, getmin, getname, getoperand, getowner, getTailPathInstruction, gettermInstruction, gettypeDesc, getvar, isAaload, isAastore, isAconst_null, isAload, isAnchor, isAnewarray, isAreturn, isArraylength, isAstore, isAthrow, isBaload, isBastore, isBipush, isCaload, isCastore, isCheckcast, isConsPathInstruction, isD2f, isD2i, isD2l, isDadd, isDaload, isDastore, isDcmpg, isDcmpl, isDconst_0, isDconst_1, isDdiv, isDload, isDmul, isDneg, isDrem, isDreturn, isDstore, isDsub, isDup_x1, isDup_x2, isDup, isDup2_x1, isDup2_x2, isDup2, isEmptyPathInstruction, isF2d, isF2i, isF2l, isFadd, isFaload, isFastore, isFcmpg, isFcmpl, isFconst_0, isFconst_1, isFconst_2, isFdiv, isFload, isFmul, isFneg, isFrem, isFreturn, isFstore, isFsub, isGetfield, isGetstatic, isGoto, isI2b, isI2c, isI2d, isI2f, isI2l, isI2s, isIadd, isIaload, isIand, isIastore, isIconst_0, isIconst_1, isIconst_2, isIconst_3, isIconst_4, isIconst_5, isIconst_m1, isIdiv, isIf_acmpeq, isIf_acmpne, isIf_icmpeq, isIf_icmpge, isIf_icmpgt, isIf_icmple, isIf_icmplt, isIf_icmpne, isIfeq, isIfge, isIfgt, isIfle, isIflt, isIfne, isIfnonnull, isIfnull, isIinc, isIload, isImul, isIneg, isInstanceof, isInvokeinterface, isInvokespecial, isInvokestatic, isInvokevirtual, isIor, isIrem, isIreturn, isIshr, isIstore, isIsub, isIushr, isIxor, isJsr, isL2d, isL2f, isL2i, isLabInstruction, isLadd, isLaload, isLand, isLastore, isLcmp, isLconst_0, isLconst_1, isLdc, isLdiv, isLload, isLmul, isLneg, isLookupswitch, isLor, isLrem, isLreturn, isLshl, isLshr, isLstore, isLsub, isLushr, isLxor, isMonitorenter, isMonitorexit, isMultianewarray, isNew, isNewarray, isNop, isPop, isPop2, isPutfield, isPutstatic, isRefInstruction, isRet, isReturn, isSaload, isSastore, isSipush, isSwap, isTableswitch, isVarInstruction, length, reverse, setcst, setdflt, setdims, setfieldDesc, setHeadPathInstruction, setincr, setkeys, setlabel, setlabelInstruction, setlabels, setmax, setmethodDesc, setmin, setname, setoperand, setowner, setTailPathInstruction, settermInstruction, settypeDesc, setvar
 
Methods inherited from class tom.library.adt.bytecode.BytecodeAbstractType
applyGlobalRedirection, convertATermToBoolean, convertATermToChar, convertATermToDouble, convertATermToFloat, convertATermToInt, convertATermToLong, convertATermToString, expand, getMapFromLabelToPosition, getMapFromLabelToPositionAndRemoveLabels, getMapFromPositionToLabel, getUniqueIdentifier, globalRedirection, label2path, normalize, normalizeWithLabels, setUniqueIdentifier, swap, toString, unexpand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

make

public static Ishl make()
Constructor that builds a term rooted by Ishl

Returns:
a term rooted by Ishl

symbolName

public String symbolName()
Returns the name of the symbol

Specified by:
symbolName in class BytecodeAbstractType
Returns:
the name of the symbol

duplicate

public shared.SharedObject duplicate()
Copy the object and returns the copy

Specified by:
duplicate in interface shared.SharedObject
Returns:
a clone of the SharedObject

toStringBuilder

public void toStringBuilder(StringBuilder buffer)
Appends a string representation of this term to the buffer given as argument.

Specified by:
toStringBuilder in class BytecodeAbstractType
Parameters:
buffer - the buffer to which a string represention of this term is appended.

compareToLPO

public int compareToLPO(Object o)
Compares two terms. This functions implements a total lexicographic path ordering.

Specified by:
compareToLPO in class BytecodeAbstractType
Parameters:
o - object to which this term is compared
Returns:
a negative integer, zero, or a positive integer as this term is less than, equal to, or greater than the argument
Throws:
ClassCastException - in case of invalid arguments
RuntimeException - if unable to compare childs

compareTo

public int compareTo(Object o)
Compares two terms. This functions implements a total order.

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in class BytecodeAbstractType
Parameters:
o - object to which this term is compared
Returns:
a negative integer, zero, or a positive integer as this term is less than, equal to, or greater than the argument
Throws:
ClassCastException - in case of invalid arguments
RuntimeException - if unable to compare childs

hashCode

public final int hashCode()
Returns hashCode

Specified by:
hashCode in interface shared.SharedObject
Overrides:
hashCode in class Object
Returns:
hashCode

equivalent

public final boolean equivalent(shared.SharedObject obj)
Checks if a SharedObject is equivalent to the current object

Specified by:
equivalent in interface shared.SharedObject
Parameters:
obj - SharedObject to test
Returns:
true if obj is a Ishl and its members are equal, else false

isIshl

public boolean isIshl()
Returns true if the term is rooted by the symbol Ishl

Overrides:
isIshl in class Instruction
Returns:
true, because this is rooted by Ishl

toATerm

public aterm.ATerm toATerm()
Returns an ATerm representation of this term.

Overrides:
toATerm in class Instruction
Returns:
an ATerm representation of this term.

fromTerm

public static Instruction fromTerm(aterm.ATerm trm,
                                   ATermConverter atConv)
Apply a conversion on the ATerm contained in the String and returns a tom.library.adt.bytecode.types.Instruction from it

Parameters:
trm - ATerm to convert into a Gom term
atConv - ATerm Converter used to convert the ATerm
Returns:
the Gom term

getChildCount

public int getChildCount()
Returns the number of childs of the term

Specified by:
getChildCount in interface Visitable
Returns:
the number of childs of the term

getChildAt

public Visitable getChildAt(int index)
Returns the child at the specified index

Specified by:
getChildAt in interface Visitable
Parameters:
index - index of the child to return; must be nonnegative and less than the childCount
Returns:
the child at the specified index
Throws:
IndexOutOfBoundsException - if the index out of range

setChildAt

public Visitable setChildAt(int index,
                            Visitable v)
Set the child at the specified index

Specified by:
setChildAt in interface Visitable
Parameters:
index - index of the child to set; must be nonnegative and less than the childCount
v - child to set at the specified index
Returns:
the child which was just set
Throws:
IndexOutOfBoundsException - if the index out of range

setChildren

public Visitable setChildren(Visitable[] childs)
Set children to the term

Specified by:
setChildren in interface Visitable
Parameters:
childs - array of children to set
Returns:
an array of children which just were set
Throws:
IndexOutOfBoundsException - if length of "childs" is different than 0

getChildren

public Visitable[] getChildren()
Returns the whole children of the term

Specified by:
getChildren in interface Visitable
Returns:
the children of the term

hashFunction

protected static int hashFunction()
Compute a hashcode for this term. (for internal use)

Returns:
a hash value