private static ClassNode getSerializeClass ( ClassNode alias ) { List < AnnotationNode > annotations = alias . getAnnotations ( ClassHelper . make ( AnnotationCollector . class ) ) ; if ( ! annotations . isEmpty ( ) ) { AnnotationNode annotationNode = annotations . get ( 0 ) ; Expression member = annotationNode . getMember ( "serializeClass" ) ; if ( member instanceof ClassExpression ) { ClassExpression ce = ( ClassExpression ) member ; if ( ! ce . getType ( ) . getName ( ) . equals ( AnnotationCollector . class . getName ( ) ) ) { alias = ce . getType ( ) ; } } } return alias ; }
2 . 5 . 3 and above gets from annotation attribute otherwise self