Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,37 +224,36 @@ private String generateUrlNullCheck(int index) {
*/
private String generateMethodContent(Method method) {
Adaptive adaptiveAnnotation = method.getAnnotation(Adaptive.class);
StringBuilder code = new StringBuilder(512);
if (adaptiveAnnotation == null) {
return generateUnsupported(method);
} else {
int urlTypeIndex = getUrlTypeIndex(method);
}
StringBuilder code = new StringBuilder(512);
int urlTypeIndex = getUrlTypeIndex(method);

// found parameter in URL type
if (urlTypeIndex != -1) {
// Null Point check
code.append(generateUrlNullCheck(urlTypeIndex));
} else {
// did not find parameter in URL type
code.append(generateUrlAssignmentIndirectly(method));
}
// found parameter in URL type
if (urlTypeIndex != -1) {
// Null Point check
code.append(generateUrlNullCheck(urlTypeIndex));
} else {
// did not find parameter in URL type
code.append(generateUrlAssignmentIndirectly(method));
}

String[] value = getMethodAdaptiveValue(adaptiveAnnotation);
String[] value = getMethodAdaptiveValue(adaptiveAnnotation);

boolean hasInvocation = hasInvocationArgument(method);
boolean hasInvocation = hasInvocationArgument(method);

code.append(generateInvocationArgumentNullCheck(method));
code.append(generateInvocationArgumentNullCheck(method));

code.append(generateExtNameAssignment(value, hasInvocation));
// check extName == null?
code.append(generateExtNameNullCheck(value));
code.append(generateExtNameAssignment(value, hasInvocation));
// check extName == null?
code.append(generateExtNameNullCheck(value));

code.append(generateScopeModelAssignment());
code.append(generateExtensionAssignment());
code.append(generateScopeModelAssignment());
code.append(generateExtensionAssignment());

// return statement
code.append(generateReturnAndInvocation(method));
}
// return statement
code.append(generateReturnAndInvocation(method));

return code.toString();
}
Expand Down