static int getReturnTypeSize(final String signature) { final int index = signature.lastIndexOf(')') + 1; return Type.size(getTypeSize(signature.substring(index))); }
/** @return size of field (1 or 2) */ protected int getFieldSize( final ConstantPoolGen cpg ) { return Type.size(Type.getTypeSize(getSignature(cpg))); }
static int getArgumentTypesSize( final 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) != ')') { final int coded = getTypeSize(signature.substring(index)); res += size(coded); index += consumed(coded); } } catch (final StringIndexOutOfBoundsException e) { // Should never occur throw new ClassFormatException("Invalid method signature: " + signature, e); } return res; }