Examples of ClassFormatException


Examples of org.apache.bcel.classfile.ClassFormatException

            wrap(consumed_chars, _temp);
            return new ArrayType(t, dim);
        } else { // type == T_REFERENCE
            int index = signature.indexOf(';'); // Look for closing `;'
            if (index < 0) {
                throw new ClassFormatException("Invalid signature: " + signature);
            }
            //corrected concurrent private static field acess
            wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
            return new ObjectType(signature.substring(1, index).replace('/', '.'));
        }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

        try {
            // Read return type after `)'
            int index = signature.lastIndexOf(')') + 1;
            return getType(signature.substring(index));
        } catch (StringIndexOutOfBoundsException e) { // Should never occur
            throw new ClassFormatException("Invalid method signature: " + signature);
        }
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

        List vec = new ArrayList();
        int index;
        Type[] types;
        try { // Read all declarations between for `(' and `)'
            if (signature.charAt(0) != '(') {
                throw new ClassFormatException("Invalid method signature: " + signature);
            }
            index = 1; // current string position
            while (signature.charAt(index) != ')') {
                vec.add(getType(signature.substring(index)));
                //corrected concurrent private static field acess
                index += unwrap(consumed_chars); // update position
            }
        } catch (StringIndexOutOfBoundsException e) { // Should never occur
            throw new ClassFormatException("Invalid method signature: " + signature);
        }
        types = new Type[vec.size()];
        vec.toArray(types);
        return types;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

                str = (constantToString(cp.getConstant(i), cp, v) + ' ' +
                        constantToString(cp.getConstant(j), cp, v));
                break;

            default: // Never reached
                throw new ClassFormatException("Unknown constant type " + tag);
        }
        return str;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

            wrap(consumed_chars, _temp);
            return new ArrayType(t, dim);
        } else { // type == T_REFERENCE
            int index = signature.indexOf(';'); // Look for closing `;'
            if (index < 0) {
                throw new ClassFormatException("Invalid signature: " + signature);
            }
            //corrected concurrent private static field acess
            wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
            return new ObjectType(signature.substring(1, index).replace('/', '.'));
        }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

        try {
            // Read return type after `)'
            int index = signature.lastIndexOf(')') + 1;
            return getType(signature.substring(index));
        } catch (StringIndexOutOfBoundsException e) { // Should never occur
            throw new ClassFormatException("Invalid method signature: " + signature, e);
        }
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

        List<Type> vec = new ArrayList<Type>();
        int index;
        Type[] types;
        try { // Read all declarations between for `(' and `)'
            if (signature.charAt(0) != '(') {
                throw new ClassFormatException("Invalid method signature: " + signature);
            }
            index = 1; // current string position
            while (signature.charAt(index) != ')') {
                vec.add(getType(signature.substring(index)));
                //corrected concurrent private static field acess
                index += unwrap(consumed_chars); // update position
            }
        } catch (StringIndexOutOfBoundsException e) { // Should never occur
            throw new ClassFormatException("Invalid method signature: " + signature, e);
        }
        types = new Type[vec.size()];
        vec.toArray(types);
        return types;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

    static int getArgumentTypesSize( String signature ) {
        int res = 0;
        int index;
        try { // Read all declarations between for `(' and `)'
            if (signature.charAt(0) != '(') {
                throw new ClassFormatException("Invalid method signature: " + signature);
            }
            index = 1; // current string position
            while (signature.charAt(index) != ')') {
                int coded = getTypeSize(signature.substring(index));
                res += size(coded);
                index += consumed(coded);
            }
        } catch (StringIndexOutOfBoundsException e) { // Should never occur
            throw new ClassFormatException("Invalid method signature: " + signature, e);
        }
        return res;
    }
View Full Code Here

Examples of org.apache.bcel.classfile.ClassFormatException

            int consumed = consumed(getTypeSize(signature.substring(dim)));
            return encode(1, dim + consumed);
        } else { // type == T_REFERENCE
            int index = signature.indexOf(';'); // Look for closing `;'
            if (index < 0) {
                throw new ClassFormatException("Invalid signature: " + signature);
            }
            return encode(1, index + 1);
        }
    }
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.ClassFormatException

      return new TypeHolder(new ArrayType(th.getType(), dim), dim + th.getConsumed());
    } else { // type == T_REFERENCE
      // Format is 'Lblahblah;'
      int index = signature.indexOf(';'); // Look for closing ';'
      if (index < 0) {
        throw new ClassFormatException("Invalid signature: " + signature);
      }

      // generics awareness
      int nextAngly = signature.indexOf('<');
      String typeString = null;
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.