public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
private <T extends Annotation> T findDeepAnnotation( Annotation[] annotations, Class<T> annotationType, int depth) { if (depth == 0) { return null; } for (Annotation each : annotations) { if (annotationType.isInstance(each)) { return annotationType.cast(each); } Annotation candidate = findDeepAnnotation(each.annotationType() .getAnnotations(), annotationType, depth - 1); if (candidate != null) { return annotationType.cast(candidate); } } return null; }
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned) throws InstantiationException, IllegalAccessException { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation == null) { return null; } return annotation.value().newInstance(); }
private <T extends Annotation> T findDeepAnnotation( Annotation[] annotations, Class<T> annotationType, int depth) { if (depth == 0) { return null; } for (Annotation each : annotations) { if (annotationType.isInstance(each)) { return annotationType.cast(each); } Annotation candidate = findDeepAnnotation(each.annotationType() .getAnnotations(), annotationType, depth - 1); if (candidate != null) { return annotationType.cast(candidate); } } return null; }
private ParameterSupplier getSupplier(ParameterSignature unassigned) throws Exception { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation != null) { return buildParameterSupplierFromClass(annotation.value()); } else { return new AllMembersSupplier(clazz); } }
@Override protected void validateTestMethods(List<Throwable> errors) { for (FrameworkMethod each : computeTestMethods()) { if (each.getAnnotation(Theory.class) != null) { each.validatePublicVoid(false, errors); each.validateNoTypeParametersOnArgs(errors); } else { each.validatePublicVoidNoArg(false, errors); } for (ParameterSignature signature : ParameterSignature.signatures(each.getMethod())) { ParametersSuppliedBy annotation = signature.findDeepAnnotation(ParametersSuppliedBy.class); if (annotation != null) { validateParameterSupplier(annotation.value(), errors); } } } }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
private <T extends Annotation> T findDeepAnnotation( Annotation[] annotations, Class<T> annotationType, int depth) { if (depth == 0) { return null; } for (Annotation each : annotations) { if (annotationType.isInstance(each)) { return annotationType.cast(each); } Annotation candidate = findDeepAnnotation(each.annotationType() .getAnnotations(), annotationType, depth - 1); if (candidate != null) { return annotationType.cast(candidate); } } return null; }
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned) throws InstantiationException, IllegalAccessException { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation == null) { return null; } return annotation.value().newInstance(); }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
public <T extends Annotation> T findDeepAnnotation(Class<T> annotationType) { Annotation[] annotations2 = annotations; return findDeepAnnotation(annotations2, annotationType, 3); }
private <T extends Annotation> T findDeepAnnotation( Annotation[] annotations, Class<T> annotationType, int depth) { if (depth == 0) { return null; } for (Annotation each : annotations) { if (annotationType.isInstance(each)) { return annotationType.cast(each); } Annotation candidate = findDeepAnnotation(each.annotationType() .getAnnotations(), annotationType, depth - 1); if (candidate != null) { return annotationType.cast(candidate); } } return null; }
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned) throws InstantiationException, IllegalAccessException { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation == null) { return null; } return annotation.value().newInstance(); }
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned) throws InstantiationException, IllegalAccessException { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation == null) { return null; } return annotation.value().newInstance(); }
private ParameterSupplier getSupplier(ParameterSignature unassigned) throws Exception { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation != null) { return buildParameterSupplierFromClass(annotation.value()); } else { return new AllMembersSupplier(clazz); } }
private ParameterSupplier getSupplier(ParameterSignature unassigned) throws Exception { ParametersSuppliedBy annotation = unassigned .findDeepAnnotation(ParametersSuppliedBy.class); if (annotation != null) { return buildParameterSupplierFromClass(annotation.value()); } else { return new AllMembersSupplier(clazz); } }
@Override protected void validateTestMethods(List<Throwable> errors) { for (FrameworkMethod each : computeTestMethods()) { if (each.getAnnotation(Theory.class) != null) { each.validatePublicVoid(false, errors); each.validateNoTypeParametersOnArgs(errors); } else { each.validatePublicVoidNoArg(false, errors); } for (ParameterSignature signature : ParameterSignature.signatures(each.getMethod())) { ParametersSuppliedBy annotation = signature.findDeepAnnotation(ParametersSuppliedBy.class); if (annotation != null) { validateParameterSupplier(annotation.value(), errors); } } } }