public static boolean looksLikeSyntheticAccessor(MethodIdItem methodIdItem) { return methodIdItem.getMethodName().getStringValue().startsWith("access$"); }
protected boolean isInvokeInit() { if (instruction == null || !instruction.opcode.canInitializeReference()) { return false; } //TODO: check access flags instead of name? InstructionWithReference instruction = (InstructionWithReference)this.instruction; Item item = instruction.getReferencedItem(); assert item.getItemType() == ItemType.TYPE_METHOD_ID_ITEM; MethodIdItem method = (MethodIdItem)item; if (!method.getMethodName().getStringValue().equals("<init>")) { return false; } return true; }
MethodIdItem methodIdItem = (MethodIdItem)item; if (!methodIdItem.getMethodName().getStringValue().equals("<init>")) { return;
boolean isInit = false; if (methodIdItem.getMethodName().getStringValue().charAt(0) == '<') { if ((invokeType & INVOKE_DIRECT) != 0) { isInit = true; if (!encodedMethod.method.getMethodName().getStringValue().equals("<init>")) { throw new ValidationException(String.format("Cannot call %s on type %s. The object type must " + "match the method type exactly", methodIdItem.getMethodString(),
public static boolean looksLikeSyntheticAccessor(MethodIdItem methodIdItem) { return methodIdItem.getMethodName().getStringValue().startsWith("access$"); }
protected boolean isInvokeInit() { if (instruction == null || !instruction.opcode.canInitializeReference()) { return false; } //TODO: check access flags instead of name? InstructionWithReference instruction = (InstructionWithReference)this.instruction; Item item = instruction.getReferencedItem(); assert item.getItemType() == ItemType.TYPE_METHOD_ID_ITEM; MethodIdItem method = (MethodIdItem)item; if (!method.getMethodName().getStringValue().equals("<init>")) { return false; } return true; }
@Nonnull private TestCaseEvent convertToTestCaseEvent(ClassDefItem classDefItem, AnnotationDirectoryItem annotationDirectoryItem, AnnotationDirectoryItem.MethodAnnotation method) { String testMethod = method.method.getMethodName().getStringValue(); AnnotationItem[] annotations = method.annotationSet.getAnnotations(); String testClass = getClassName(classDefItem); boolean isIgnored = isClassIgnored(annotationDirectoryItem) || isMethodIgnored(annotations); List<String> permissionsToRevoke = getPermissionsToRevoke(annotations); Map<String, String> properties = getTestProperties(annotations); return testCaseEvent() .withTestClass(testClass) .withTestMethod(testMethod) .withIsIgnored(isIgnored) .withPermissionsToRevoke(permissionsToRevoke) .withProperties(properties) .build(); }