Class Cim2Java

java.lang.Object
net.aifusion.utils.Cim2Java

public class Cim2Java extends Object
Factory class to generate Java code stubs from Cim Class definitions
Author:
Sharad Singhal
  • Constructor Details

  • Method Details

    • generateStub

      public String generateStub(NamedElement c)
      Return a string containing the generated java class stub
      Parameters:
      c - - CimClass to use for generating stub
      Returns:
      - string containing the content of the java class
    • showHelp

      public static void showHelp(String javaCommand)
    • main

      public static void main(String[] args)
      Program to generate java stubs from one or more MOF files. This program accepts one or more MOF files, and generates java stubs from the MOF files. Qualifiers in the MOF files are used to create the appropriate java constructs. The program should be executed as follows:
      "$ java Cim2Java [options] mofFile ..."
      where options can be (defaults in [])
      -h [true|false]
      put Cim2Java header in code [true]
      -s srcDirectory
      source directory used to write java files [src1]
      -v version
      default version number (should be of form nn.nn.nn) to use [0.0.1]
      -o [true|false]
      overwrite existing java files in case of conflict [false]
      -c [true|false]
      add method-level comments with MOF in generated code [false]
      -r repository
      persistent repository used to resolve input classes [none]
      -l logLevel
      logging level for messages [warning]
      -n nameSpace
      name space to use in repository (only if used with -r) [/root/local]
      -sv [true|false]
      Use StructureValue based constructor [false]
      The stub generator recognizes the following qualifiers in the MOF description
      Abstract
      Generate an abstract java class
      Interface
      Generate an interface java class
      Static
      Generate a static method or property in java
      Deprecated
      Label a java class, method, or property as @Deprecated
      Provider
      Use the value as a java class name for this MOF class
      [UML]PackagePath
      Use the value as the package name for the java class
      Version
      add the version value to the version annotation parameter in the java class
      Implements
      Add the defined interfaces to the java class
      Read
      The property is readable
      Write
      The property is writable
      Override
      annotate the property or method as overriding a superclass property or method using @Override
      Parameters:
      args - - program arguments