Package cn.wensiqun.asmsupport.utils

Examples of cn.wensiqun.asmsupport.utils.Scope


        this.insnHelper = new CommonInstructionHelper(this);
       
        if(!ModifierUtils.isAbstract(me.getModifier())){
            // 设置method属性
            this.methodBody = methodBody;
            this.methodBody.setScope(new Scope(this.locals, null));
            this.methodBody.setOwnerBlock(null);
            this.methodBody.setInsnHelper(insnHelper);
          methodOwner = context.getCurrentClass();
        }
    }
View Full Code Here


     * @param pb
     * @param parentBlock
     */
    protected void subBlockPrepare(ProgramBlock pb, ProgramBlock parentBlock){
      pb.setInsnHelper(insnHelper);
      pb.setScope(new Scope(method.getLocals(), parentBlock.getScope()));
      //设置父类的Block
      pb.setOwnerBlock(parentBlock.getExecuteBlock());
      if(pb instanceof Try || pb instanceof Catch || pb instanceof Finally){
        if(pb instanceof Try){
          this.getMethod().setNearlyTryBlock((Try)pb);
View Full Code Here

     * local variable declaration.
     */
    private void declarationVariable(Scope parent) {
        List<Component> coms = parent.getComponents();
        Component com;
        Scope lastBrotherScope = null;
        for (int i = 0; i < coms.size(); i++) {
            com = coms.get(i);
            if (com instanceof ScopeLogicVariable) {
                ScopeLogicVariable slv = (ScopeLogicVariable) com;
                if(slv.isAnonymous()){
View Full Code Here

    public LocalVariable(LocalVariableEntity lve) {
        this.lve = lve;
    }

    public boolean availableFor(AbstractOperator operator) {
        Scope operScope = operator.getBlock().getScope();
        // 如果此变量是operator的直系变量
        if (this.scopeLogicVar.isSubOf(operScope)) {
            if(scopeLogicVar.getCompileOrder() > operator.getCompileOrder()){
                throw new VariableOperatorException();
            }
View Full Code Here

TOP

Related Classes of cn.wensiqun.asmsupport.utils.Scope

Copyright © 2018 www.massapicom. 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.