private Group [ ] parseMethods ( Class clazz ) { List < Group > groups = new ArrayList ( ) ; Group unknownGroup = new Group ( ) ; groups . add ( unknownGroup ) ; String [ ] groupsOrder = new String [ 0 ] ; for ( Method method : clazz . getMethods ( ) ) { Property prop = new Property ( ) ; prop . deprecated = method . isAnnotationPresent ( Deprecated . class ) ; if ( method . isAnnotationPresent ( Key . class ) ) { Key val = method . getAnnotation ( Key . class ) ; prop . name = val . value ( ) ; } else { prop . name = method . getName ( ) ; } if ( method . isAnnotationPresent ( DefaultValue . class ) ) { DefaultValue val = method . getAnnotation ( DefaultValue . class ) ; prop . defaultValue = val . value ( ) ; } unknownGroup . properties . add ( prop ) ; } return orderGroup ( groups , groupsOrder ) ; }
Method to get group array with subgroups and properties .