org.eigenbase.enki.netbeans.codegen
Class NetbeansGenerator

java.lang.Object
  org.eigenbase.enki.codegen.GeneratorBase
      org.eigenbase.enki.codegen.MdrGenerator
          org.eigenbase.enki.netbeans.codegen.NetbeansGenerator
All Implemented Interfaces:
Generator

public class NetbeansGenerator
extends MdrGenerator

NetbeansGenerator generates JMI interfaces for a metamodel. It is functionally equivalent to this sequence of Netbeans MDRANT tasks:

   <mdr>
     <instantiate name="ExtentName"/>
     <readXMI file="Model.xmi" extent="ExtentName"/>
     <mapJava dir="OutputDir" extent="ExtentName"/>
   </mdr>
 
Values for the extent name, model file and output directory are configured via the base class methods MdrGenerator.setExtentName(String), GeneratorBase.setXmiFile(java.io.File), and GeneratorBase.setOutputDirectory(java.io.File).

Supported options:

Name Description
"include" List of packages (by fully-qualified Java name) to include. All other packages are excluded. If unspecified, all packages are included. Optional.

Author:
Stephan Zuercher

Field Summary
static String INCLUDE_PACKAGE_OPTION
          The name of the generator option for including specific packages.
private  List<String> includedPackageList
          Included package list.
 
Fields inherited from class org.eigenbase.enki.codegen.MdrGenerator
DEFAULT_ENKI_MODEL_EXTENT_NAME
 
Fields inherited from class org.eigenbase.enki.codegen.GeneratorBase
enableGenerics, outputDir, xmiFile
 
Constructor Summary
NetbeansGenerator()
           
 
Method Summary
protected  void configureHandlers()
          Configures a concrete base class's desired handlers.
static void main(String[] args)
           
 void setOptions(Map<String,String> options)
          Accepts the INCLUDE_PACKAGE_OPTION option and ignores all others.
 
Methods inherited from class org.eigenbase.enki.codegen.MdrGenerator
doMain, execute, getExtent, getExtentName, setExtentName
 
Methods inherited from class org.eigenbase.enki.codegen.GeneratorBase
addHandler, generateObject, getAccessorName, getAccessorName, getAccessorName, getAccessorName, getAssociationEnds, getAssociationKind, getClassFieldName, getCollectionType, getEnumFieldName, getMutatorName, getMutatorName, getParam, getRefBaseObject, getSimpleTypeName, getSimpleTypeName, getTypeName, getTypeName, getTypeName, getTypeName, getTypeName, getTypeName, getTypeName, getTypeName, getXmiFile, setOutputDirectory, setUseGenerics, setXmiFile, transformIdentifier, visitRefAssociation, visitRefBaseObject, visitRefClass, visitRefObject, visitRefPackage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCLUDE_PACKAGE_OPTION

public static final String INCLUDE_PACKAGE_OPTION
The name of the generator option for including specific packages.

See Also:
Constant Field Values

includedPackageList

private List<String> includedPackageList
Included package list.

Constructor Detail

NetbeansGenerator

public NetbeansGenerator()
Method Detail

setOptions

public void setOptions(Map<String,String> options)
Accepts the INCLUDE_PACKAGE_OPTION option and ignores all others.

Specified by:
setOptions in interface Generator
Overrides:
setOptions in class GeneratorBase
Parameters:
options - map of option name to option value

configureHandlers

protected void configureHandlers()
Description copied from class: MdrGenerator
Configures a concrete base class's desired handlers. Must make one or more calls to GeneratorBase.addHandler(Handler).

Specified by:
configureHandlers in class MdrGenerator

main

public static void main(String[] args)