// first reference all methods declarations and field declarations
MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
boolean noConstructor = true;
if (methods != null) {
for (int i = 0, max = methods.length; i < max; i++) {
MethodInfo method = methods[i];
boolean isConstructor = method.isConstructor();
char[] descriptor = method.getMethodDescriptor();
char[][] parameterTypes = decodeParameterTypes(descriptor, isConstructor && isNestedType);
char[] returnType = decodeReturnType(descriptor);
char[][] exceptionTypes = replace('/', '.', method.getExceptionTypeNames());
if (isConstructor) {
noConstructor = false;
char[] signature = method.getGenericSignature();
if (signature == null) {
if (reader.isNestedType() && ((modifiers & ClassFileConstants.AccStatic) == 0)) {
signature = removeFirstSyntheticParameter(descriptor);
} else {
signature = descriptor;
}
}
addConstructorDeclaration(
name,
parameterTypes == null ? 0 : parameterTypes.length,
signature,
parameterTypes,
method.getArgumentNames(),
method.getModifiers(),
packageName,
modifiers,
exceptionTypes,
extraFlags);
} else {
if (!method.isClinit()) {
addMethodDeclaration(method.getSelector(), parameterTypes, returnType, exceptionTypes);
}
}
// look for references in method annotations
annotations = method.getAnnotations();
if (annotations != null) {
for (int a=0, length=annotations.length; a<length; a++) {
IBinaryAnnotation annotation = annotations[a];
addBinaryAnnotation(annotation);
}
}
tagBits = method.getTagBits() & TagBits.AllStandardAnnotationsMask;
if (tagBits != 0) {
addBinaryStandardAnnotations(tagBits);
}
}
}