public static final DeclarationTransformer getDeclarationTransformer ( ) { if ( dt == null ) { try { @ SuppressWarnings ( "unchecked" ) Class < ? extends DeclarationTransformerImpl > clazz = ( Class < ? extends DeclarationTransformerImpl > ) Class . forName ( DEFAULT_DECLARATION_TRANSFORMER ) ; Method m = clazz . getMethod ( "getInstance" ) ; registerDeclarationTransformer ( ( DeclarationTransformerImpl ) m . invoke ( null ) ) ; log . debug ( "Retrived {} as default DeclarationTransformer implementation." , DEFAULT_DECLARATION_TRANSFORMER ) ; } catch ( Exception e ) { log . error ( "Unable to get DeclarationTransformer from default" , e ) ; throw new RuntimeException ( "No DeclarationTransformer implementation registered!" ) ; } } return dt ; }
Returns the registered DeclarationTransformer