src/main/java/org/fuin/srcgen4j/core/velocity/PTGenHelper.java
public static SrcGen4JConfig createAndInit(final SrcGen4JContext context, final File configFile) throws UnmarshalObjectException {
        try {
            final JaxbHelper helper = new JaxbHelper();
            final SrcGen4JConfig config = helper.create(configFile, JAXBContext.newInstance(SrcGen4JConfig.class,
                    VelocityGeneratorConfig.class, ParameterizedTemplateParserConfig.class, ParameterizedTemplateGeneratorConfig.class));
            config.init(context, Utils4J.getCanonicalFile(configFile.getParentFile()));
            return config;
        } catch (final JAXBException ex) {
            throw new UnmarshalObjectException("Error reading the configuration: " + configFile, ex);
        }
    }
public static SrcGen4JConfig createAndInit(final SrcGen4JContext context, final File configFile) throws UnmarshalObjectException {
        try {
            final JaxbHelper helper = new JaxbHelper();
            final SrcGen4JConfig config = helper.create(configFile, JAXBContext.newInstance(SrcGen4JConfig.class,
                    VelocityGeneratorConfig.class, ParameterizedTemplateParserConfig.class, ParameterizedTemplateGeneratorConfig.class));
            config.init(context, Utils4J.getCanonicalFile(configFile.getParentFile()));
            return config;
        } catch (final JAXBException ex) {
            throw new UnmarshalObjectException("Error reading the configuration: " + configFile, ex);
        }
    }
public static SrcGen4JConfig createAndInit ( final SrcGen4JContext context , final File configFile ) throws UnmarshalObjectException { try { final JaxbHelper helper = new JaxbHelper ( ) ; final SrcGen4JConfig config = helper . create ( configFile , JAXBContext . newInstance ( SrcGen4JConfig . class , VelocityGeneratorConfig . class , ParameterizedTemplateParserConfig . class , ParameterizedTemplateGeneratorConfig . class ) ) ; config . init ( context , Utils4J . getCanonicalFile ( configFile . getParentFile ( ) ) ) ; return config ; } catch ( final JAXBException ex ) { throw new UnmarshalObjectException ( "Error reading the configuration: " + configFile , ex ) ; } }
Creates and initializes a SrcGen4J configuration from a configuration file that contains ONLY generators/parsers of type
{@link ParameterizedTemplateParser} and {@link ParameterizedTemplateGenerator}.

@param context
Current context - Cannot be NULL.
@param configFile
XML configuration file to read - Cannot be NULL.

@return New configuration instance.

@throws UnmarshalObjectException
Error reading the configuration.
Creates and initializes a SrcGen4J configuration from a configuration file that contains ONLY generators / parsers of type { @link ParameterizedTemplateParser } and { @link ParameterizedTemplateGenerator } .