Class ExpanderJobs

java.lang.Object
eu.bandm.tools.expander.ExpanderJobs

public class ExpanderJobs extends Object
Translates a simple table representation into control data for maven and gnu make, to apply the ParameterExpander to template files to selected substitution qualifiers. The input file and three output files are located in the current working directory. The substitution files contain the rules to replace the different parameter references (like $abc) in the template files, see ParameterExpander. The substitution qualifiers are used to select the substitution files <substitution qualifier>.properties and are inserted into the names of the generated expanded files for the first appearance of »_« in the name of the template file. A template file with no »_« in its file name must not be asssigned to multiple substitution qualifiers.
 
  File <pwd>/expanderjobs.txt ...

    File1__x            Int Bool Float
    F2_                 Int      Float
    F3_.jjava           Int      Float
    File4.java              Bool
     \                   \
      \                   \
      template file names  substitution qualifiers
  
  ... will be translated into <pwd>/expanderjobs.xml ...

  
    Bool
      generate-sources
      
        parameter-expander
      
      
        src/main/parameter-expander/Bool.properties
        
        Bool
         
           [ARG[0]]/File1__x.java
           [ARG[0]]/File4.java
         
      
   
   ... etc.

  ... and into <pwd>/expanderjobs.mk1 ...

    EXPANDED :=
    EXPANDED += File1Int_x.java
    EXPANDED += File1Bool_x.java
    EXPANDED += File1Float_x.java
    EXPANDED += F2Int.java
    EXPANDED += F2Float.java
    EXPANDED += F3Int.java
    EXPANDED += F3Float.java
    EXPANDED += File4.java
  
  ... and into <pwd>/expanderjobs.mk2 ...

File1Bool_x.java File1Float_x.java File1Int_x.java: gen-templates/File1__x.java
           $(JAVA) -classpath $(PRJCLASSPATH)   \
           eu.bandm.tools.util3.ParameterExpander \
           --inputFiles $^ --targetdir $(shell pwd) \
           --placeholder _  --qualifiers Bool Float Int \
           --substitutionFiles  [ARG[1]]

F2Int.java F2Float.java F3Int.java F3Float.java: gen-templates/F2.java gen-templates/F3.java
           $(JAVA) -classpath $(PRJCLASSPATH)   \
           eu.bandm.tools.util3.ParameterExpander \
           --inputFiles $^ --targetdir $(shell pwd) \
           --placeholder _  --qualifiers Float Int \
           --substitutionFiles  [ARG[1]]

    File4.java: gen-templates/File4.java
           $(JAVA) -classpath $(PRJCLASSPATH)   \
           eu.bandm.tools.util3.ParameterExpander \
           --inputFiles $^ --targetdir $(shell pwd) \
           --placeholder _  --qualifiers Bool \
           --substitutionFiles  [ARG[1]]
  
  • Field Details

  • Constructor Details

    • ExpanderJobs

      public ExpanderJobs()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Service entry.
      Parameters:
      args - [0] = package name of generated files, encoded as file path
      args [1] = absolute positon of properties directory. directory.
      Throws:
      IOException