private Set < Class < ? > > getClasses ( ) { HashSet < Class < ? > > result = new HashSet < Class < ? > > ( ) ; // in case of override only the last global configuration must be analyzed JGlobalMap jGlobalMap = null ; for ( Class < ? > clazz : getAllsuperClasses ( configuredClass ) ) { // only if global configuration is null will be searched global configuration on super classes if ( isNull ( jGlobalMap ) ) { jGlobalMap = clazz . getAnnotation ( JGlobalMap . class ) ; //if the field configuration is defined in the global map if ( ! isNull ( jGlobalMap ) ) { addClasses ( jGlobalMap . classes ( ) , result ) ; if ( ! isNull ( jGlobalMap . excluded ( ) ) ) for ( Field field : getListOfFields ( configuredClass ) ) { JMap jMap = field . getAnnotation ( JMap . class ) ; if ( ! isNull ( jMap ) ) for ( String fieldName : jGlobalMap . excluded ( ) ) if ( field . getName ( ) . equals ( fieldName ) ) addClasses ( jMap . classes ( ) , result , field . getName ( ) ) ; } return result ; } } } for ( Field field : getListOfFields ( configuredClass ) ) { JMap jMap = field . getAnnotation ( JMap . class ) ; if ( ! isNull ( jMap ) ) addClasses ( jMap . classes ( ) , result , field . getName ( ) ) ; } return result ; }
Returns all Target Classes