Code example for AnnotatedElement

Methods: getAnnotation

0
                && (annotation instanceof JoinColumn)
                && ((target instanceof Field) || (target instanceof Method))) {
            _log.debug("processing field annotation " + annotation.toString());
 
            boolean targetValid = false;
            if (target.getAnnotation(OneToOne.class) != null) {
                targetValid = true;
            } 
            if (target.getAnnotation(ManyToOne.class) != null) {
                targetValid = true;
            } 
            if (target.getAnnotation(OneToMany.class) != null) {
                targetValid = true;
            } 
            if (!targetValid) {
                _log
                        .error("JoinTable annotation on " 
                                + ((Member) target).getName()
                                + " is not valid! Needs a relationship annotation! Ignoring @JoinTable!"); 
                return false; 
Connect your IDE to all the code out there  Get Codota for Java