private Boolean getIndexInstruction ( Class < P > clazz ) { Index ind = clazz . getAnnotation ( Index . class ) ; Unindex unind = clazz . getAnnotation ( Unindex . class ) ; if ( ind != null && unind != null ) throw new IllegalStateException ( "You cannot have @Index and @Unindex on the same class: " + clazz ) ; if ( ind != null ) return true ; else if ( unind != null ) return false ; else return null ; }
Figure out if there is an index instruction for the whole class .