Examples of VariableEntity


Examples of cn.wensiqun.asmsupport.entity.VariableEntity

                //如果是接口
                insnHelper.invokeInterface(callObjReference.getParamterizedType().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
            }else{
                log.info("invoke class method : " + name);
                if(callObjReference instanceof IVariable){
                   VariableEntity ve = ((IVariable)callObjReference).getVariableEntity();
                   if(ve.getName().equals(ASConstant.SUPER)){
                         insnHelper.invokeSuperMethod(callObjReference.getParamterizedType().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
                     }else {
                         insnHelper.invokeVirtual(callObjReference.getParamterizedType().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
                     }
                }else{
View Full Code Here

Examples of cn.wensiqun.asmsupport.entity.VariableEntity

        }
    }

    @Override
    public void executing() {
        VariableEntity ve = var.getVariableEntity();
       
        /* if method is non satic*/
        if(!Modifier.isStatic(getModifiers())){
            log.debug("call method by variable :" + var.getVariableEntity().getName());
            log.debug("put variable reference to stack");
            //变量入栈
            var.loadToStack(block);
            argumentsToStack();
            if(ve.getDeclareClass().isInterface()){
                log.debug("invoke interface method : " + name);
                //如果是接口
                insnHelper.invokeInterface(ve.getDeclareClass().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
            }else{
                log.debug("invoke class method : " + name);
                if(ve.getName().equals(ASConstant.SUPER)){
                    insnHelper.invokeSuperMethod(ve.getDeclareClass().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
                }else {
                    insnHelper.invokeVirtual(ve.getDeclareClass().getType(), this.name, getReturnType(), mtdEntity.getArgTypes());
                }
            }
            if(!isSaveReference()){
                if(!getReturnType().equals(Type.VOID_TYPE)){
                    insnHelper.pop();
View Full Code Here

Examples of cn.wensiqun.asmsupport.entity.VariableEntity

    protected final GlobalVariable getGlobalVariable(AClass aclass, String name){
        if(this.getParamterizedType() instanceof ArrayClass){
            throw new ASMSupportException("cannot get global variable from array type variable : " + this);
        }
     
      VariableEntity ve = aclass.getGlobalVariableEntity(name);
        if(ve == null){
          throw new IllegalArgumentException("dosn't exist or cannot access \"" + name + "\" property of class " + aclass);
        }
        return new GlobalVariable(this, ve.getDeclareClass(), ve.getModifiers(), ve.getName());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.