public static String getPatternName ( OptionalIdentifiedDefinition camelNode ) { // we should grab the annotation instead XmlRootElement root = camelNode . getClass ( ) . getAnnotation ( XmlRootElement . class ) ; if ( root != null ) { return root . name ( ) ; } String simpleName = Strings . stripSuffix ( camelNode . getClass ( ) . getSimpleName ( ) , "Definition" ) ; return Introspector . decapitalize ( simpleName ) ; }
Returns the pattern name