private char[][] getExceptionTypeNames(NdMethod ndMethod) { List<NdMethodException> exceptions = ndMethod.getExceptions(); // Although the JavaDoc for IBinaryMethod says that the exception list will be null if empty, // the implementation in MethodInfo returns an empty array rather than null. We copy the // same behavior here in case something is relying on it. Uncomment the following if the "null" // version is deemed correct. // if (exceptions.isEmpty()) { // return null; // } char[][] result = new char[exceptions.size()][]; for (int idx = 0; idx < exceptions.size(); idx++) { NdMethodException next = exceptions.get(idx); result[idx] = next.getExceptionType().getRawType().getBinaryName(); } return result; }
private char[][] getExceptionTypeNames(NdMethod ndMethod) { List<NdMethodException> exceptions = ndMethod.getExceptions(); // Although the JavaDoc for IBinaryMethod says that the exception list will be null if empty, // the implementation in MethodInfo returns an empty array rather than null. We copy the // same behavior here in case something is relying on it. Uncomment the following if the "null" // version is deemed correct. // if (exceptions.isEmpty()) { // return null; // } char[][] result = new char[exceptions.size()][]; for (int idx = 0; idx < exceptions.size(); idx++) { NdMethodException next = exceptions.get(idx); result[idx] = next.getExceptionType().getRawType().getBinaryName(); } return result; }
public void getGenericSignature(CharArrayBuffer result, boolean includeExceptions) { NdTypeParameter.getSignature(result, getTypeParameters()); result.append('('); for (NdMethodParameter next : getMethodParameters()) { // Compiler-defined arguments don't show up in the generic signature if (!next.isCompilerDefined()) { next.getType().getSignature(result); } } result.append(')'); NdTypeSignature returnType = getReturnType(); if (returnType == null) { result.append('V'); } else { returnType.getSignature(result); } if (includeExceptions) { List<NdMethodException> exceptions = getExceptions(); for (NdMethodException next : exceptions) { result.append('^'); next.getExceptionType().getSignature(result); } } }
public void getGenericSignature(CharArrayBuffer result, boolean includeExceptions) { NdTypeParameter.getSignature(result, getTypeParameters()); result.append('('); for (NdMethodParameter next : getMethodParameters()) { // Compiler-defined arguments don't show up in the generic signature if (!next.isCompilerDefined()) { next.getType().getSignature(result); } } result.append(')'); NdTypeSignature returnType = getReturnType(); if (returnType == null) { result.append('V'); } else { returnType.getSignature(result); } if (includeExceptions) { List<NdMethodException> exceptions = getExceptions(); for (NdMethodException next : exceptions) { result.append('^'); next.getExceptionType().getSignature(result); } } }