de.smartics.properties.spi.core.context
Class DeclarationConfigParser

Package class diagram package DeclarationConfigParser
java.lang.Object
  extended by de.smartics.properties.spi.core.context.DeclarationConfigParser

public final class DeclarationConfigParser
     
     
extends Object

Parses the configuration file for properties.


Constructor Summary
DeclarationConfigParser()
          Default constructor.
 
Method Summary
 PropertiesContext parse(Class<?> type)
          Convenience method using a class' class loader to locate the configuration file to parse the configuration file at PropertiesContext.DECLARATION_FILE.
 PropertiesContext parse(de.smartics.util.lang.ClassPathContext context)
          Parses the configuration file at PropertiesContext.DECLARATION_FILE .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeclarationConfigParser

public DeclarationConfigParser()
Default constructor.

Method Detail

parse

public PropertiesContext parse(Class<?> type)
                        throws ConfigException
Convenience method using a class' class loader to locate the configuration file to parse the configuration file at PropertiesContext.DECLARATION_FILE.

Parameters:
type - the type whose class loader to use to locate the configuration file.
Returns:
the read configuration, never null.
Throws:
ConfigException - on any problem loading the file.

parse

public PropertiesContext parse(de.smartics.util.lang.ClassPathContext context)
                        throws ConfigException
Parses the configuration file at PropertiesContext.DECLARATION_FILE .

Parameters:
context - the context to use to locate the configuration file.
Returns:
the read configuration, never null.
Throws:
ConfigException - on any problem loading the file.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.