public char[] getMethodDescriptor() { char[] name = getMethodName().getChars(); int descriptorStart = CharArrayUtils.indexOf('(', name, 0, name.length); return CharArrayUtils.subarray(name, descriptorStart, name.length); } }
public char[] getMethodDescriptor() { char[] name = getMethodName().getChars(); int descriptorStart = CharArrayUtils.indexOf('(', name, 0, name.length); return CharArrayUtils.subarray(name, descriptorStart, name.length); } }
/** * Returns the list of methods, in declaration order. */ public List<NdMethod> getMethodsInDeclarationOrder() { List<NdMethod> unsorted = getMethods(); NdMethod[] sorted = new NdMethod[unsorted.size()]; for (NdMethod next : unsorted) { int pos = next.getDeclarationPosition(); if (pos < 0 || pos >= sorted.length) { throw getNd().describeProblem() .addProblemAddress(NdMethod.DECLARATION_POSITION, next.getAddress()) .build("Method " + next.getMethodName().getString() + " reports invalid position of " + pos); //$NON-NLS-1$//$NON-NLS-2$ } NdMethod oldMethodAtThisPosition = sorted[pos]; if (oldMethodAtThisPosition != null) { throw getNd().describeProblem() .addProblemAddress(NdMethod.DECLARATION_POSITION, next.getAddress()) .addProblemAddress(NdMethod.DECLARATION_POSITION, oldMethodAtThisPosition.getAddress()) .build("Method " + oldMethodAtThisPosition.getMethodName().getString() //$NON-NLS-1$ + " and method " + next.getMethodName().getString() + " both claim to be at position " //$NON-NLS-1$//$NON-NLS-2$ + pos); } sorted[pos] = next; } return Arrays.asList(sorted); }
/** * Returns the list of methods, in declaration order. */ public List<NdMethod> getMethodsInDeclarationOrder() { List<NdMethod> unsorted = getMethods(); NdMethod[] sorted = new NdMethod[unsorted.size()]; for (NdMethod next : unsorted) { int pos = next.getDeclarationPosition(); if (pos < 0 || pos >= sorted.length) { throw getNd().describeProblem() .addProblemAddress(NdMethod.DECLARATION_POSITION, next.getAddress()) .build("Method " + next.getMethodName().getString() + " reports invalid position of " + pos); //$NON-NLS-1$//$NON-NLS-2$ } NdMethod oldMethodAtThisPosition = sorted[pos]; if (oldMethodAtThisPosition != null) { throw getNd().describeProblem() .addProblemAddress(NdMethod.DECLARATION_POSITION, next.getAddress()) .addProblemAddress(NdMethod.DECLARATION_POSITION, oldMethodAtThisPosition.getAddress()) .build("Method " + oldMethodAtThisPosition.getMethodName().getString() //$NON-NLS-1$ + " and method " + next.getMethodName().getString() + " both claim to be at position " //$NON-NLS-1$//$NON-NLS-2$ + pos); } sorted[pos] = next; } return Arrays.asList(sorted); }