Package cn.wensiqun.asmsupport.exception

Examples of cn.wensiqun.asmsupport.exception.ASMSupportException


    @Override
    protected void init() {
        if(!condition.getParamterizedType().equals(AClass.BOOLEAN_WRAP_ACLASS) &&
           !condition.getParamterizedType().equals(AClass.BOOLEAN_ACLASS) ){
            throw new ASMSupportException("the condition type of if statement must be boolean or Boolean, but was " + condition.getParamterizedType());
        }
        //condition.asArgument();
    }
View Full Code Here


            } catch (NoSuchFieldException e) {
            }
        }
       
        if(f == null){
            throw new ASMSupportException("no such field exception : " + name);
        }
       
        if(!ModifierUtils.isStatic(f.getModifiers())){
            throw new ASMSupportException("the field \"" + f.getName() + "\" is non-static, cannot use current method!");
        }
       
        return new GlobalVariable(fieldOwner.equals(reallyClass) ? this : AClassFactory.getProductClass(fieldOwner),
            AClassFactory.getProductClass(f.getType()), f.getModifiers(), name);
    }
View Full Code Here

    }
   
    @Override
    public int getDimension() {
        if(!reallyClass.isArray()){
            throw new ASMSupportException("this class is not array");
        }
        return type.getDimensions();
        //return StringUtils.splitPreserveAllTokens(name, '[').length - 1;
    }
View Full Code Here

    @Override
    protected void init() {
        if(!condition.getParamterizedType().equals(AClass.BOOLEAN_WRAP_ACLASS) &&
           !condition.getParamterizedType().equals(AClass.BOOLEAN_ACLASS) ){
            throw new ASMSupportException("the condition type of if statement must be boolean or Boolean, but was " + condition.getParamterizedType());
        }
    }
View Full Code Here

            } catch (NoSuchFieldException e) {
            }
        }
       
        if(f == null){
            throw new ASMSupportException("no such field exception : " + name);
        }
       
        return new GlobalVariable(AClassFactory.getProductClass(fieldOwner),
                new ProductClass(f.getType()), 0, name);
    }
View Full Code Here

        AClass expCls1 = exp1.getParamterizedType();
        AClass expCls2 = exp2.getParamterizedType();
        AClass expCls3 = exp3.getParamterizedType();
       
        if(!expCls1.equals(AClass.BOOLEAN_ACLASS) && !expCls1.equals(AClass.BOOLEAN_WRAP_ACLASS)){
            throw new ASMSupportException("the first expression type of ternary operator must by boolean or Boolean!");
        }
       
        if(!checkExpression(expCls2, expCls3)){
            throw new ASMSupportException("cannot convert!");
        }
    }
View Full Code Here

            //mettnc = determineMethodInJavaClass(invoker, methodOwner.getReallyClass(), name, argsTypes);
            //me = determineMostSpecificMethodEntity(mettnc);
          if(me != null){
                foundNumber++;
                if(foundNumber > 1){
                    throw new ASMSupportException(" Ambiguous ...............");
                }
            }
        }
       
        return me;
View Full Code Here

        List<TypeTreeNode[]> appliNodes = applicableVariableVarifyMethodArgumentsNodes(applicable);

        if(appliNodes.size() > 0){
            int mostIndex = mostSpecificIndexForVariableVarify(appliNodes);
            if(mostIndex == -1){
                throw new ASMSupportException(" Ambiguous ...............");
            }else{
                MethodEntity me = applicable.get(mostIndex);
                return me;
            }
        }else{
View Full Code Here

  private void constructEachEnumConstant(){

    constructEnumField();
   
    if(getMethodOwner().getEnumNum() != enumArgumentsList.size()){
      throw new ASMSupportException("exist unassign enum constant!");
    }
   
    Parameterized[] values = new Parameterized[getMethodOwner().getEnumNum()];
    GlobalVariable enumConstant;
    int i = 0;
View Full Code Here

     * @param ca
     * @return
     */
    public Catch catchException(Catch ca){
      if(this.finallyBlock != null){
            throw new ASMSupportException("exist finally block. please create catch before finally block");
      }
     
        this.catchEntity = ca;
        ca.setEntityTry(this);
        parentExes.add(ca);
View Full Code Here

TOP

Related Classes of cn.wensiqun.asmsupport.exception.ASMSupportException

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.