Package org.geotools.util
Class IndexedResourceCompiler
- Object
-
- IndexedResourceCompiler
-
- All Implemented Interfaces:
Comparator<Object>
public final class IndexedResourceCompiler extends Object implements Comparator<Object>
Resource compiler. This class is run from the command line at compile time only.IndexedResourceCompilerscans for.propertiesfiles and copies their content to.utffiles using UTF8 encoding. It also checks for key validity and checks values forMessageFormatcompatibility. Finally, it creates aFooKeys.javasource file declaring resource keys as integer constants.This class must be run from the maven root of Geotools project.
IndexedResourceCompilerand allFooKeysclasses don't need to be included in the final JAR file. They are used at compile time only and no other classes should keep reference to them.- Since:
- 2.4
- Author:
- Martin Desruisseaux (IRD)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Object o1, Object o2)Compares two resource keys.static voidmain(String... args)Run the compiler for GeoTools resources.static voidmain(String[] args, File sourceDirectory, Class<? extends IndexedResourceBundle>[] resourcesToProcess)Run the resource compiler.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Object o1, Object o2)
Compares two resource keys. Objecto1ando2are usuallyStringobjects representing resource keys (for example, "MISMATCHED_DIMENSION"), but may also beMap.Entry.- Specified by:
comparein interfaceComparator<Object>
-
main
public static void main(String[] args, File sourceDirectory, Class<? extends IndexedResourceBundle>[] resourcesToProcess)
Run the resource compiler.- Parameters:
args- The command-line arguments.sourceDirectory- The base directory for"java""resources"sub-directories. The directory structure must be consistent with Maven conventions.resourcesToProcess- The resource bundle base classes (e.g.Vocabulary.class}).
-
main
public static void main(String... args)
Run the compiler for GeoTools resources.
-
-