Package com.sun.org.apache.bcel.internal.classfile

Examples of com.sun.org.apache.bcel.internal.classfile.ConstantValue


    for(com.sun.org.apache.bcel.internal.classfile.Field fld: fields) {
      final boolean isStatic = (fld.getModifiers() & Modifier.STATIC) != 0;
      final boolean isFinal = (fld.getModifiers() & Modifier.FINAL) != 0;
      StubResolver fldstub = new SimpleResolver(new TypeName(fld.getType().toString())) ;
      if (isStatic && isFinal) {
        ConstantValue cv = fld.getConstantValue();
        Object o ;
        if (cv != null) {
          Constant c = cv.getConstantPool().getConstant(cv.getConstantValueIndex());
          if (c instanceof ConstantObject) {
            o = ((ConstantObject)c).getConstantValue(cv.getConstantPool()) ;
            try {
              o = StdJavaExpressions.cast( this, fldstub, new ConstObj(o)) ;
            } catch (CompilerException e) {
              o = null ;
            }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.bcel.internal.classfile.ConstantValue

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.