Code example for AnnotatedElement

Methods: isAnnotationPresent

0
	} 
 
	private <I, A> boolean verifyArguments(I info, A annotation,
			AnnotatedElement target) {
		if (!(annotation instanceof GeneratedValue)
				|| (!target.isAnnotationPresent(GeneratedValue.class))
				|| (!target.isAnnotationPresent(Id.class))
				|| !(info instanceof JPAFieldNature)) {
			return false; 
		} 
		return true; 
	} 
 
	private <I, A> void processGeneratorDefinition(I nature, A annotation) {
		GeneratedValue generatedValue = (GeneratedValue) annotation;
 
		((JPAFieldNature) nature).setGeneratedValueStrategy(generatedValue.strategy());
		((JPAFieldNature) nature).setGeneratedValueGenerator(generatedValue.generator());
 
	} 
Contextual code suggestions in your IDE  Get Codota for Java