cn.wensiqun.asmsupport.block
类 ProgramBlock

java.lang.Object
  继承者 cn.wensiqun.asmsupport.definition.AbstractExecuteable
      继承者 cn.wensiqun.asmsupport.block.ProgramBlock
所有已实现的接口:
IBlockOperators, ArithmeticOperator, ArrayOperator, Bitwise, CreateBlockOperator, CrementOperator, LogicalOperator, MethodInvokeOperator, RelationalOperator, ThisVariableable, ValueOperator, VariableOperator, Executeable, Cloneable
直接已知子类:
ForEachLoop, SeriesBlock, SuperMethodBody, Synchronized, WhileLoop

public abstract class ProgramBlock
extends AbstractExecuteable
implements IBlockOperators, Cloneable

作者:
温斯群(Joe Wen)

字段摘要
protected  InstructionHelper insnHelper
           
protected  Method method
           
protected  ProgramBlock ownerBlock
          属于哪个block。
protected  boolean returned
          当前block是否已经返回 或者已经抛出异常了
protected  Scope scope
           
 
构造方法摘要
protected ProgramBlock()
          create a logic program block
 
方法摘要
 Addition add(Parameterized factor1, Parameterized factor2)
          generate the instruction that correspond to factor1 + factor2
 void addAllExe(int index, List<Executeable> exes)
           
 void addException(AClass exception)
          添加抛出的异常到方法签名中
 void addExe(Executeable exe)
          添加一个Executeable
 AfterDecrement afterDec(Crementable crement)
          i--
 AfterIncrement afterInc(Crementable crement)
          i++
 Parameterized append(Parameterized par1, Parameterized... pars)
           
 ArrayLength arrayLength(ArrayLoader arrayReference, Parameterized... dims)
           
 ArrayLength arrayLength(ArrayValue arrayReference, Parameterized... dims)
           
 ArrayLength arrayLength(Assigner arrayReference, Parameterized... dims)
           
 ArrayLength arrayLength(IVariable arrayReference, Parameterized... dims)
          get length of array java code:
i[1].length
note: i is int[][]{{1},{2}} asmsupport code:
arrayLength(i, getValue(1))
 ArrayLength arrayLength(MethodInvoker arrayReference, Parameterized... dims)
           
 ArrayLoader arrayLoad(ArrayLoader arrayReference, Parameterized pardim, Parameterized... parDims)
           
 ArrayLoader arrayLoad(ArrayValue arrayReference, Parameterized pardim, Parameterized... parDims)
           
 ArrayLoader arrayLoad(Assigner arrayReference, Parameterized pardim, Parameterized... parDims)
           
 ArrayLoader arrayLoad(IVariable arrayReference, Parameterized pardim, Parameterized... parDims)
          get value from array according to index
java code:
i[1][2]; asmsupport code:
arrayLoad(i, getValue(1), getValue(2))
 ArrayLoader arrayLoad(MethodInvoker arrayReference, Parameterized pardim, Parameterized... parDims)
           
 ArrayStorer arrayStore(ArrayLoader arrayReference, Parameterized value, Parameterized dim, Parameterized... dims)
           
 ArrayStorer arrayStore(ArrayValue arrayReference, Parameterized value, Parameterized dim, Parameterized... dims)
           
 ArrayStorer arrayStore(Assigner arrayReference, Parameterized value, Parameterized dim, Parameterized... dims)
           
 ArrayStorer arrayStore(IVariable arrayReference, Parameterized value, Parameterized dim, Parameterized... dims)
          set value from array according to index
java code:
i[1][2] = 10; asmsupport code:
arrayStore(i, getValue(10), getValue(1), getValue(2))
 ArrayStorer arrayStore(MethodInvoker arrayReference, Parameterized value, Parameterized dim, Parameterized... dims)
           
 Assigner assign(MemberVariable mv, Parameterized val)
          assign a value to a variable. for exampel: java code:
i = 10; asmsupport code:
assign(i, getValue(10));
 BeforeDecrement beforeDec(Crementable crement)
          --i
 BeforeIncrement beforeInc(Crementable crement)
          ++i
 BitAnd bitAnd(Parameterized factor1, Parameterized factor2)
          factor1 & factor2
 BitOr bitOr(Parameterized factor1, Parameterized factor2)
          factor1 | factor2
 BitXor bitXor(Parameterized factor1, Parameterized factor2)
          factor1 ^ factor2
 void breakout()
           
 CheckCast checkCast(Parameterized cc, AClass to)
          checkcast a value to target type.
 void clonerGenerate(ProgramBlock cloneTo)
          克隆当前的程序块的执行队列到给定程序块执行队列中
 ShortCircuitAnd conditionalAnd(Parameterized factor1, Parameterized factor2)
          factor1 && factor2
 ShortCircuitOr conditionalOr(Parameterized factor1, Parameterized factor2)
          factor1 || factor2
 void continueout()
           
 LocalVariable createArrayVariable(String name, ArrayClass aClass, boolean anonymous, Object parameterizedArray)
           
 LocalVariable createArrayVariable(String name, ArrayClass aClass, boolean anonymous, Parameterized value)
           
 LocalVariable createArrayVariableWithAllocateDimension(String name, ArrayClass aClass, boolean anonymous, Parameterized... allocateDim)
          创建数组变量,可分配数组空间大小 createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, null) --> String[][] array = null; createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, Value.value(3)) --> String[][] array = new String[3][]; createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, Value.value(3), Value.value(2)) --> String[][] array = new String[3][2];
 LocalVariable createVariable(String name, AClass aClass, boolean anonymous, Parameterized para)
          create a local variable
 Division div(Parameterized factor1, Parameterized factor2)
          generate the instruction that correspond to factor1 / factor2
 WhileLoop dowhile(DoWhileLoop dwl)
           
 Equal equal(Parameterized factor1, Parameterized factor2)
           
 boolean equals(Object obj)
           
 void execute()
          执行
abstract  void executing()
           
 ForEachLoop forEach(ForEachLoop forEach)
           
abstract  void generateInsn()
          override this method if want create a new block 生成操作到执行队列中去。
 ProgramBlock getCopy()
          获取当前程序块的克隆拷贝
protected  ProgramBlock getExecuteBlock()
           
 List<Executeable> getExecuteQueue()
           
 InstructionHelper getInsnHelper()
           
protected  LocalVariable getLocalAnonymousVariableModel(AClass aClass)
           
protected  LocalVariable getLocalVariableModel(String name, AClass aClass)
           
 Method getMethod()
           
 LocalVariable[] getMethodArguments()
           
protected  SuperMethodBody getMethodBody()
           
 NewMemberClass getMethodOwner()
          get current method owner.
 ProgramBlock getOwnerBlock()
           
 List<Executeable> getPreExecuteInsn()
           
 Scope getScope()
           
 SuperVariable getSuper()
          get "super". like use super key word in java
 ThisVariable getThis()
          get "this". like use this key word in java
 ThrowExceptionContainer getThrowExceptions()
           
 GreaterEqual greaterEqual(Parameterized factor1, Parameterized factor2)
           
 GreaterThan greaterThan(Parameterized factor1, Parameterized factor2)
           
 IF ifthan(IF ifs)
           
protected abstract  void init()
           
 Parameterized instanceOf(Parameterized obj, AClass type)
           
 Inverts inverts(Parameterized factor)
           
 MethodInvoker invoke(Parameterized caller, String methodName, Parameterized... arguments)
          invoke a method by other method invoker, for example: java code: "String".getClass().toString(); asmsupport code: MethodInvoker getClass = invoke(Value.value("String"), "getClass()"); invoke(getClass, "toString");
 MethodInvoker invokeConstructor(AClass owner, Parameterized... arguments)
           
 MethodInvoker invokeOriginalMethod()
          invoke by proxy method
 MethodInvoker invokeStatic(AClass owner, String methodName, Parameterized... arguments)
           
protected  void invokeVerify(AClass a)
           
 boolean isReturned()
           
 boolean isUnreachableCode(AbstractOperator currentOperator)
           
 LeftShift leftShift(Parameterized factor1, Parameterized factor2)
          factor1 << factor2
 LessEqual lessEqual(Parameterized factor1, Parameterized factor2)
           
 LessThan lessThan(Parameterized factor1, Parameterized factor2)
           
 LogicalAnd logicalAnd(Parameterized factor1, Parameterized factor2)
          factor1 & factor2
 LogicalOr logicalOr(Parameterized factor1, Parameterized factor2)
          factor1 | factor2
 LogicalXor logicalXor(Parameterized factor1, Parameterized factor2)
          factor1 ^ factor2
 Modulus mod(Parameterized factor1, Parameterized factor2)
           
 Multiplication mul(Parameterized factor1, Parameterized factor2)
          generate the instruction that correspond to factor1 * factor2
 Negative neg(Parameterized factor)
           
 ArrayValue newArray(ArrayClass aClass, Parameterized... allocateDims)
           
 ArrayValue newArrayWithValue(ArrayClass aClass, Object arrayObject)
          create a unknow dim array
 ArrayValue newArrayWithValue(ArrayClass aClass, Parameterized[] values)
          execute new array operator, cannot support more than 4 dim array, becuase we not need more than 4 dim array in really business service
for example:
java code:
new int[]{2} asmsupport code:
newArray(AClassGetter.getArrayClass(int[].class), new Parameterized[]{getValue(1)});
 ArrayValue newArrayWithValue(ArrayClass aClass, Parameterized[][] values)
          create a two dim array
 ArrayValue newArrayWithValue(ArrayClass aClass, Parameterized[][][] values)
          create a three dim array
 ArrayValue newArrayWithValue(ArrayClass aClass, Parameterized[][][][] values)
          create a four dim array
 Not not(Parameterized factor)
          !
 NotEqual notEqual(Parameterized factor1, Parameterized factor2)
           
 void prepare()
          执行execute的预先操作 在此方法中如果要对执行队列操作 那么不能对执行队列做删除和添加操作 只能做替操作 除了MethodBody类型的Block是通过直接调用的方式执行Prepare方法之外, 其他Block 均在调用创建该Block的时候触发Prepare方法, 所有创建非MethodBody类型Block都在 jw.asmsupport.block.operator.CreateBlockOperator接口中 对于一般的Block,比如if...else...
 void removeException(AClass exception)
           
 void removeExe(Executeable exe)
           
 void replaceExe(Executeable old, Executeable newp)
          替换
 RightShift rightShift(Parameterized factor1, Parameterized factor2)
          factor1 >> factor2
 Return runReturn()
          run return statement
 Return runReturn(Parameterized parame)
          run return statement with return value
 void setExecuteBlock(ProgramBlock exeBlock)
           
 void setInsnHelper(InstructionHelper insnHelper)
           
 void setOwnerBlock(ProgramBlock block)
           
 void setReturned(boolean returned)
           
 void setScope(Scope scope)
           
 void setWhetherCheckUnreachableCode(boolean whetherCheckUnreachableCode)
           
 Subtraction sub(Parameterized factor1, Parameterized factor2)
          generate the instruction that correspond to factor1 - factor2
protected  void subBlockPrepare(ProgramBlock pb)
           
protected  void subBlockPrepare(ProgramBlock pb, ProgramBlock parentBlock)
          通常情况下的prepare
 Synchronized syn(Synchronized s)
           
 TernaryOperator ternary(Parameterized exp1, Parameterized exp2, Parameterized exp3)
           
 void throwException(Parameterized exception)
           
 void tiggerTryCatchPrepare()
           
 Try tryDo(Try t)
           
 UnsignedRightShift unsignedRightShift(Parameterized factor1, Parameterized factor2)
          factor1 >>> factor2
 boolean whetherCheckUnreachableCode()
           
 WhileLoop whileloop(WhileLoop wl)
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

scope

protected Scope scope

ownerBlock

protected ProgramBlock ownerBlock
属于哪个block。父block


insnHelper

protected InstructionHelper insnHelper

method

protected Method method

returned

protected boolean returned
当前block是否已经返回 或者已经抛出异常了

构造方法详细信息

ProgramBlock

protected ProgramBlock()
create a logic program block

参数:
mv -
scope -
parent -
方法详细信息

setExecuteBlock

public void setExecuteBlock(ProgramBlock exeBlock)

getExecuteBlock

protected ProgramBlock getExecuteBlock()

getThrowExceptions

public ThrowExceptionContainer getThrowExceptions()

addException

public void addException(AClass exception)
添加抛出的异常到方法签名中

参数:
exception -

removeException

public void removeException(AClass exception)

whetherCheckUnreachableCode

public boolean whetherCheckUnreachableCode()

setWhetherCheckUnreachableCode

public void setWhetherCheckUnreachableCode(boolean whetherCheckUnreachableCode)

equals

public boolean equals(Object obj)
覆盖:
Object 中的 equals

isReturned

public boolean isReturned()

setReturned

public void setReturned(boolean returned)

getPreExecuteInsn

public List<Executeable> getPreExecuteInsn()

getExecuteQueue

public List<Executeable> getExecuteQueue()

isUnreachableCode

public boolean isUnreachableCode(AbstractOperator currentOperator)

init

protected abstract void init()

getCopy

public ProgramBlock getCopy()
获取当前程序块的克隆拷贝

返回:

clonerGenerate

public void clonerGenerate(ProgramBlock cloneTo)
克隆当前的程序块的执行队列到给定程序块执行队列中

参数:
owner - 克隆至此

generateInsn

public abstract void generateInsn()
override this method if want create a new block 生成操作到执行队列中去。


prepare

public void prepare()
从接口 Executeable 复制的描述

执行execute的预先操作 在此方法中如果要对执行队列操作 那么不能对执行队列做删除和添加操作 只能做替操作

除了MethodBody类型的Block是通过直接调用的方式执行Prepare方法之外, 其他Block 均在调用创建该Block的时候触发Prepare方法, 所有创建非MethodBody类型Block都在 jw.asmsupport.block.operator.CreateBlockOperator接口中

对于一般的Block,比如if...else... 比如如下代码:

 public void method(){
     if(...){
        while(....){
           ...
        }
     }else{
        for(...){
           ...
        }
     }
 }
 

通常执行prepare的顺序如下:

 $ 表示调用 CreateBlockOperator.xxx方法
 _\ 表示触发prepare方法
 
    MethodBody
         |
         |$
         |____\ IF Block
         |          |
         |          |$
         |          |____\ While Block
         |                       |
         |                       |
         |/______________________|
         |           
         |$
         |____\ Else Block 
                    |
                    |$
                    |____\ For Block
                                 |
                                 |
   Method Body End /_____________|
   
 

但是对于每个连续的Try...Catch...Finally...块, asmsupport会先将这一连续的 块逐一创建完成,再执行各自的Prepare方法。 如下图所示

 $ 表示调用 createBlockOperator.xxx方法
 _\ 表示出发prepare方法
 
    MethodBody
         |
         |$
         |____\ Try Block 1
         |          | 
         |          |
         |                         |
         |$                        |
         |____\ Catch Block 1      |
         |                         |
         |$                        |
         |____\ Finally Block 1    |
         |                         |
         |                         |
         |_________________________|
         
                                 |
   Method Body End /_____________|
   
 

指定者:
接口 Executeable 中的 prepare

subBlockPrepare

protected void subBlockPrepare(ProgramBlock pb)

subBlockPrepare

protected void subBlockPrepare(ProgramBlock pb,
                               ProgramBlock parentBlock)
通常情况下的prepare

参数:
pb -
parentBlock -

tiggerTryCatchPrepare

public void tiggerTryCatchPrepare()

execute

public final void execute()
从接口 Executeable 复制的描述
执行

指定者:
接口 Executeable 中的 execute

executing

public abstract void executing()

addExe

public void addExe(Executeable exe)
添加一个Executeable

参数:
exe -

addAllExe

public void addAllExe(int index,
                      List<Executeable> exes)

removeExe

public void removeExe(Executeable exe)
参数:
exe -

replaceExe

public void replaceExe(Executeable old,
                       Executeable newp)
替换

参数:
old -
newp -

setScope

public void setScope(Scope scope)

getScope

public Scope getScope()

setInsnHelper

public void setInsnHelper(InstructionHelper insnHelper)

setOwnerBlock

public void setOwnerBlock(ProgramBlock block)

getOwnerBlock

public ProgramBlock getOwnerBlock()

getMethod

public Method getMethod()

getMethodArguments

public LocalVariable[] getMethodArguments()

getMethodBody

protected SuperMethodBody getMethodBody()

getMethodOwner

public NewMemberClass getMethodOwner()
get current method owner.

返回:

getInsnHelper

public InstructionHelper getInsnHelper()

getLocalAnonymousVariableModel

protected final LocalVariable getLocalAnonymousVariableModel(AClass aClass)

getLocalVariableModel

protected final LocalVariable getLocalVariableModel(String name,
                                                    AClass aClass)

createVariable

public final LocalVariable createVariable(String name,
                                          AClass aClass,
                                          boolean anonymous,
                                          Parameterized para)
从接口 VariableOperator 复制的描述
create a local variable

指定者:
接口 VariableOperator 中的 createVariable
参数:
name - variable name.
aClass - variable type.
anonymous - true will not put the variable to "local variable table". in other world, the name will be invalid.
para - this variable initial value, set to null if you want the initial is null.
返回:
the LocalVariable

createArrayVariableWithAllocateDimension

public final LocalVariable createArrayVariableWithAllocateDimension(String name,
                                                                    ArrayClass aClass,
                                                                    boolean anonymous,
                                                                    Parameterized... allocateDim)
从接口 VariableOperator 复制的描述

创建数组变量,可分配数组空间大小

 createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, null) --> String[][] array = null;
 createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, Value.value(3)) --> String[][] array = new String[3][];
 createArrayVariableWithAllocateDimension("array", AClassFactory.getArrayClass(String[][].class), false, Value.value(3), Value.value(2)) --> String[][] array = new String[3][2];
 

指定者:
接口 VariableOperator 中的 createArrayVariableWithAllocateDimension
参数:
name - 变量名
aClass - 数组类型
anonymous - 是否匿名
allocateDim - 预分配的数组空间
返回:

createArrayVariable

public final LocalVariable createArrayVariable(String name,
                                               ArrayClass aClass,
                                               boolean anonymous,
                                               Parameterized value)
指定者:
接口 VariableOperator 中的 createArrayVariable
返回:

createArrayVariable

public LocalVariable createArrayVariable(String name,
                                         ArrayClass aClass,
                                         boolean anonymous,
                                         Object parameterizedArray)
指定者:
接口 VariableOperator 中的 createArrayVariable
返回:

assign

public final Assigner assign(MemberVariable mv,
                             Parameterized val)
从接口 VariableOperator 复制的描述
assign a value to a variable. for exampel: java code:
 i = 10;
 
asmsupport code:
 assign(i, getValue(10));
 

指定者:
接口 VariableOperator 中的 assign
返回:

newArray

public final ArrayValue newArray(ArrayClass aClass,
                                 Parameterized... allocateDims)
指定者:
接口 ValueOperator 中的 newArray
返回:
另请参见:
IBlockOperators#createArrayVariable(String, ArrayClass, Parameterized, Parameterized...)

newArrayWithValue

public final ArrayValue newArrayWithValue(ArrayClass aClass,
                                          Object arrayObject)
从接口 ValueOperator 复制的描述
create a unknow dim array

指定者:
接口 ValueOperator 中的 newArrayWithValue
arrayObject - Parameterized array
返回:

newArrayWithValue

public final ArrayValue newArrayWithValue(ArrayClass aClass,
                                          Parameterized[] values)
从接口 ValueOperator 复制的描述
execute new array operator, cannot support more than 4 dim array, becuase we not need more than 4 dim array in really business service
for example:
 java code:
new int[]{2}
asmsupport code:
 newArray(AClassGetter.getArrayClass(int[].class), new Parameterized[]{getValue(1)});
 

指定者:
接口 ValueOperator 中的 newArrayWithValue
返回:

newArrayWithValue

public final ArrayValue newArrayWithValue(ArrayClass aClass,
                                          Parameterized[][] values)
从接口 ValueOperator 复制的描述
create a two dim array

指定者:
接口 ValueOperator 中的 newArrayWithValue
返回:

newArrayWithValue

public final ArrayValue newArrayWithValue(ArrayClass aClass,
                                          Parameterized[][][] values)
从接口 ValueOperator 复制的描述
create a three dim array

指定者:
接口 ValueOperator 中的 newArrayWithValue
返回:

newArrayWithValue

public final ArrayValue newArrayWithValue(ArrayClass aClass,
                                          Parameterized[][][][] values)
从接口 ValueOperator 复制的描述
create a four dim array

指定者:
接口 ValueOperator 中的 newArrayWithValue
返回:

arrayLoad

public final ArrayLoader arrayLoad(IVariable arrayReference,
                                   Parameterized pardim,
                                   Parameterized... parDims)
从接口 ArrayOperator 复制的描述
get value from array according to index

java code:
i[1][2];

asmsupport code:
arrayLoad(i, getValue(1), getValue(2))

指定者:
接口 ArrayOperator 中的 arrayLoad
返回:

arrayLoad

public final ArrayLoader arrayLoad(MethodInvoker arrayReference,
                                   Parameterized pardim,
                                   Parameterized... parDims)
指定者:
接口 ArrayOperator 中的 arrayLoad
返回:

arrayLoad

public ArrayLoader arrayLoad(ArrayLoader arrayReference,
                             Parameterized pardim,
                             Parameterized... parDims)
指定者:
接口 ArrayOperator 中的 arrayLoad
返回:

arrayLoad

public ArrayLoader arrayLoad(ArrayValue arrayReference,
                             Parameterized pardim,
                             Parameterized... parDims)
指定者:
接口 ArrayOperator 中的 arrayLoad
返回:

arrayLoad

public ArrayLoader arrayLoad(Assigner arrayReference,
                             Parameterized pardim,
                             Parameterized... parDims)
指定者:
接口 ArrayOperator 中的 arrayLoad
返回:

arrayStore

public final ArrayStorer arrayStore(IVariable arrayReference,
                                    Parameterized value,
                                    Parameterized dim,
                                    Parameterized... dims)
从接口 ArrayOperator 复制的描述
set value from array according to index

java code:
i[1][2] = 10;

asmsupport code:
arrayStore(i, getValue(10), getValue(1), getValue(2))

指定者:
接口 ArrayOperator 中的 arrayStore
返回:

arrayStore

public final ArrayStorer arrayStore(MethodInvoker arrayReference,
                                    Parameterized value,
                                    Parameterized dim,
                                    Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayStore
返回:

arrayStore

public ArrayStorer arrayStore(ArrayLoader arrayReference,
                              Parameterized value,
                              Parameterized dim,
                              Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayStore
返回:

arrayStore

public ArrayStorer arrayStore(ArrayValue arrayReference,
                              Parameterized value,
                              Parameterized dim,
                              Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayStore
返回:

arrayStore

public ArrayStorer arrayStore(Assigner arrayReference,
                              Parameterized value,
                              Parameterized dim,
                              Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayStore
返回:

arrayLength

public final ArrayLength arrayLength(IVariable arrayReference,
                                     Parameterized... dims)
从接口 ArrayOperator 复制的描述
get length of array

java code:
i[1].length
note: i is int[][]{{1},{2}}

asmsupport code:
arrayLength(i, getValue(1))

指定者:
接口 ArrayOperator 中的 arrayLength
返回:

arrayLength

public ArrayLength arrayLength(MethodInvoker arrayReference,
                               Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayLength
返回:

arrayLength

public ArrayLength arrayLength(ArrayLoader arrayReference,
                               Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayLength
返回:

arrayLength

public ArrayLength arrayLength(ArrayValue arrayReference,
                               Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayLength
返回:

arrayLength

public ArrayLength arrayLength(Assigner arrayReference,
                               Parameterized... dims)
指定者:
接口 ArrayOperator 中的 arrayLength
返回:

checkCast

public final CheckCast checkCast(Parameterized cc,
                                 AClass to)
从接口 IBlockOperators 复制的描述
checkcast a value to target type.

指定者:
接口 IBlockOperators 中的 checkCast
参数:
cc - value
to - target type
返回:

add

public final Addition add(Parameterized factor1,
                          Parameterized factor2)
从接口 ArithmeticOperator 复制的描述
generate the instruction that correspond to factor1 + factor2

指定者:
接口 ArithmeticOperator 中的 add
返回:

sub

public final Subtraction sub(Parameterized factor1,
                             Parameterized factor2)
从接口 ArithmeticOperator 复制的描述
generate the instruction that correspond to factor1 - factor2

指定者:
接口 ArithmeticOperator 中的 sub
返回:

mul

public final Multiplication mul(Parameterized factor1,
                                Parameterized factor2)
从接口 ArithmeticOperator 复制的描述
generate the instruction that correspond to factor1 * factor2

指定者:
接口 ArithmeticOperator 中的 mul
返回:

div

public final Division div(Parameterized factor1,
                          Parameterized factor2)
从接口 ArithmeticOperator 复制的描述
generate the instruction that correspond to factor1 / factor2

指定者:
接口 ArithmeticOperator 中的 div
返回:

mod

public final Modulus mod(Parameterized factor1,
                         Parameterized factor2)
指定者:
接口 ArithmeticOperator 中的 mod
返回:

neg

public final Negative neg(Parameterized factor)
指定者:
接口 IBlockOperators 中的 neg
返回:

inverts

public final Inverts inverts(Parameterized factor)
指定者:
接口 Bitwise 中的 inverts
返回:

bitAnd

public final BitAnd bitAnd(Parameterized factor1,
                           Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 & factor2

指定者:
接口 Bitwise 中的 bitAnd
返回:

bitOr

public final BitOr bitOr(Parameterized factor1,
                         Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 | factor2

指定者:
接口 Bitwise 中的 bitOr
返回:

bitXor

public final BitXor bitXor(Parameterized factor1,
                           Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 ^ factor2

指定者:
接口 Bitwise 中的 bitXor
返回:

leftShift

public final LeftShift leftShift(Parameterized factor1,
                                 Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 << factor2

指定者:
接口 Bitwise 中的 leftShift
返回:

rightShift

public final RightShift rightShift(Parameterized factor1,
                                   Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 >> factor2

指定者:
接口 Bitwise 中的 rightShift
返回:

unsignedRightShift

public final UnsignedRightShift unsignedRightShift(Parameterized factor1,
                                                   Parameterized factor2)
从接口 Bitwise 复制的描述
factor1 >>> factor2

指定者:
接口 Bitwise 中的 unsignedRightShift
返回:

beforeDec

public final BeforeDecrement beforeDec(Crementable crement)
从接口 CrementOperator 复制的描述
--i

指定者:
接口 CrementOperator 中的 beforeDec
返回:

afterDec

public final AfterDecrement afterDec(Crementable crement)
从接口 CrementOperator 复制的描述
i--

指定者:
接口 CrementOperator 中的 afterDec
返回:

beforeInc

public final BeforeIncrement beforeInc(Crementable crement)
从接口 CrementOperator 复制的描述
++i

指定者:
接口 CrementOperator 中的 beforeInc
返回:

afterInc

public final AfterIncrement afterInc(Crementable crement)
从接口 CrementOperator 复制的描述
i++

指定者:
接口 CrementOperator 中的 afterInc
返回:

greaterThan

public final GreaterThan greaterThan(Parameterized factor1,
                                     Parameterized factor2)
指定者:
接口 RelationalOperator 中的 greaterThan
返回:

greaterEqual

public final GreaterEqual greaterEqual(Parameterized factor1,
                                       Parameterized factor2)
指定者:
接口 RelationalOperator 中的 greaterEqual
返回:

lessThan

public final LessThan lessThan(Parameterized factor1,
                               Parameterized factor2)
指定者:
接口 RelationalOperator 中的 lessThan
返回:

lessEqual

public final LessEqual lessEqual(Parameterized factor1,
                                 Parameterized factor2)
指定者:
接口 RelationalOperator 中的 lessEqual
返回:

equal

public final Equal equal(Parameterized factor1,
                         Parameterized factor2)
指定者:
接口 RelationalOperator 中的 equal
返回:

notEqual

public final NotEqual notEqual(Parameterized factor1,
                               Parameterized factor2)
指定者:
接口 RelationalOperator 中的 notEqual
返回:

logicalAnd

public final LogicalAnd logicalAnd(Parameterized factor1,
                                   Parameterized factor2)
从接口 LogicalOperator 复制的描述
factor1 & factor2

指定者:
接口 LogicalOperator 中的 logicalAnd
返回:

logicalOr

public final LogicalOr logicalOr(Parameterized factor1,
                                 Parameterized factor2)
从接口 LogicalOperator 复制的描述
factor1 | factor2

指定者:
接口 LogicalOperator 中的 logicalOr
返回:

logicalXor

public final LogicalXor logicalXor(Parameterized factor1,
                                   Parameterized factor2)
从接口 LogicalOperator 复制的描述
factor1 ^ factor2

指定者:
接口 LogicalOperator 中的 logicalXor
返回:

conditionalAnd

public final ShortCircuitAnd conditionalAnd(Parameterized factor1,
                                            Parameterized factor2)
从接口 LogicalOperator 复制的描述
factor1 && factor2

指定者:
接口 LogicalOperator 中的 conditionalAnd
返回:

conditionalOr

public final ShortCircuitOr conditionalOr(Parameterized factor1,
                                          Parameterized factor2)
从接口 LogicalOperator 复制的描述
factor1 || factor2

指定者:
接口 LogicalOperator 中的 conditionalOr
返回:

not

public final Not not(Parameterized factor)
从接口 LogicalOperator 复制的描述
!factor

指定者:
接口 LogicalOperator 中的 not
返回:

ternary

public final TernaryOperator ternary(Parameterized exp1,
                                     Parameterized exp2,
                                     Parameterized exp3)
指定者:
接口 IBlockOperators 中的 ternary
返回:

append

public final Parameterized append(Parameterized par1,
                                  Parameterized... pars)
指定者:
接口 IBlockOperators 中的 append
返回:

instanceOf

public final Parameterized instanceOf(Parameterized obj,
                                      AClass type)
指定者:
接口 IBlockOperators 中的 instanceOf
返回:

invoke

public final MethodInvoker invoke(Parameterized caller,
                                  String methodName,
                                  Parameterized... arguments)
从接口 MethodInvokeOperator 复制的描述

invoke a method by other method invoker, for example:

 java code:
 "String".getClass().toString();
 
 asmsupport code: 
 MethodInvoker getClass = invoke(Value.value("String"), "getClass()");
 invoke(getClass, "toString");
 

指定者:
接口 MethodInvokeOperator 中的 invoke
返回:

invokeVerify

protected final void invokeVerify(AClass a)

invokeStatic

public final MethodInvoker invokeStatic(AClass owner,
                                        String methodName,
                                        Parameterized... arguments)
指定者:
接口 MethodInvokeOperator 中的 invokeStatic
返回:

invokeConstructor

public final MethodInvoker invokeConstructor(AClass owner,
                                             Parameterized... arguments)
指定者:
接口 MethodInvokeOperator 中的 invokeConstructor
返回:

ifthan

public final IF ifthan(IF ifs)
指定者:
接口 CreateBlockOperator 中的 ifthan
返回:

whileloop

public final WhileLoop whileloop(WhileLoop wl)
指定者:
接口 CreateBlockOperator 中的 whileloop
返回:

dowhile

public final WhileLoop dowhile(DoWhileLoop dwl)
指定者:
接口 CreateBlockOperator 中的 dowhile
返回:

forEach

public final ForEachLoop forEach(ForEachLoop forEach)
指定者:
接口 CreateBlockOperator 中的 forEach
返回:

breakout

public final void breakout()
指定者:
接口 IBlockOperators 中的 breakout

continueout

public final void continueout()
指定者:
接口 IBlockOperators 中的 continueout

throwException

public final void throwException(Parameterized exception)
指定者:
接口 IBlockOperators 中的 throwException

tryDo

public final Try tryDo(Try t)
指定者:
接口 CreateBlockOperator 中的 tryDo
返回:

syn

public final Synchronized syn(Synchronized s)
指定者:
接口 CreateBlockOperator 中的 syn
返回:

getThis

public final ThisVariable getThis()
从接口 ThisVariableable 复制的描述
get "this". like use this key word in java

指定者:
接口 ThisVariableable 中的 getThis
返回:

getSuper

public final SuperVariable getSuper()
从接口 ThisVariableable 复制的描述
get "super". like use super key word in java

指定者:
接口 ThisVariableable 中的 getSuper
返回:

invokeOriginalMethod

public final MethodInvoker invokeOriginalMethod()
从接口 MethodInvokeOperator 复制的描述
invoke by proxy method

指定者:
接口 MethodInvokeOperator 中的 invokeOriginalMethod
返回:

runReturn

public final Return runReturn()
run return statement

指定者:
接口 IBlockOperators 中的 runReturn
返回:

runReturn

public final Return runReturn(Parameterized parame)
run return statement with return value

指定者:
接口 IBlockOperators 中的 runReturn
参数:
parame - return value


Copyright © 2013. All Rights Reserved.