org.apache.velocity.texen.util
Class PropertiesUtil
java.lang.Object
org.apache.velocity.texen.util.PropertiesUtil
public class PropertiesUtil
extends java.lang.Object
A property utility class for the texen text/code generator
Usually this class is only used from a Velocity context.
Version:
- Leon Messerschmidt
- Stephane Bailliez
Properties | load(String propertiesFile) - Load properties from either a file in the templatePath if there
is one or the classPath.
|
protected Properties | loadFromClassPath(String propertiesFile) - Load a properties file from the classpath
|
protected Properties | loadFromTemplatePath(String propertiesFile) - Load a properties file from the templatePath defined in the
generator.
|
load
public Properties load(String propertiesFile)
Load properties from either a file in the templatePath if there
is one or the classPath.
propertiesFile
- the properties file to load through
either the templatePath or the classpath.
- a properties instance filled with the properties found
in the file or an empty instance if no file was found.
loadFromClassPath
protected Properties loadFromClassPath(String propertiesFile)
Load a properties file from the classpath
propertiesFile
- the properties file to load.
- a properties instance loaded with the properties from
the file. If no file can be found it returns an empty instance.
loadFromTemplatePath
protected Properties loadFromTemplatePath(String propertiesFile)
Load a properties file from the templatePath defined in the
generator. As the templatePath can contains multiple paths,
it will cycle through them to find the file. The first file
that can be successfully loaded is considered. (kind of
like the java classpath), it is done to clone the Velocity
process of loading templates.
propertiesFile
- the properties file to load. It must be
a relative pathname.
- a properties instance loaded with the properties from
the file. If no file can be found it returns an empty instance.
Copyright © 2003 Apache Software Foundation. All Rights Reserved.