Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enhydra.tool.codegen
Class GeneratorOption  view GeneratorOption download GeneratorOption.java

java.lang.Object
  extended byorg.enhydra.tool.codegen.GeneratorOption

public class GeneratorOption
extends java.lang.Object

GeneratorOption define a generator specific option for CodeGen. Generation options include information such as the directory where to generate an application and name to use for the generated application.


Field Summary
private  boolean bool
           
private  java.lang.String description
           
private  java.lang.String displayName
           
private  java.lang.String name
           
private  boolean persistent
           
private  boolean required
           
(package private) static java.util.ResourceBundle res
           
private  java.lang.String value
           
 
Constructor Summary
GeneratorOption(java.lang.String n, boolean v, java.lang.String desc, boolean persist)
          Create a option for the current generator.
GeneratorOption(java.lang.String name, java.lang.String value, java.lang.String displayName, java.lang.String description, boolean required, boolean persistent)
          Create a option for the current generator.
 
Method Summary
 void clearValue()
           
 java.lang.String getDescription()
          Get a string describing the option.
 java.lang.String getDisplayName()
          Get name to display in Swing components.
 java.lang.String getName()
          Get the option name.
 java.lang.String getValue()
          Get the option value.
 boolean isBoolean()
          Determine if the option is a boolean switch.
 boolean isEmpty()
           
 boolean isPersistent()
          Check if the option value persistent between CodeGen sessions.
 boolean isRequired()
          Flag indicating if the values needs to be set prior to generation.
 boolean isValue()
          Get the value as a boolean.
 void setValue(boolean value)
          Set the value as a boolean.
 void setValue(java.lang.String value)
          Set the option value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

res

static java.util.ResourceBundle res

name

private java.lang.String name

value

private java.lang.String value

displayName

private java.lang.String displayName

description

private java.lang.String description

required

private boolean required

persistent

private boolean persistent

bool

private boolean bool
Constructor Detail

GeneratorOption

public GeneratorOption(java.lang.String name,
                       java.lang.String value,
                       java.lang.String displayName,
                       java.lang.String description,
                       boolean required,
                       boolean persistent)
                throws GeneratorException
Create a option for the current generator. Generators normally instantiate an array of options during initialization.


GeneratorOption

public GeneratorOption(java.lang.String n,
                       boolean v,
                       java.lang.String desc,
                       boolean persist)
                throws GeneratorException
Create a option for the current generator. Generators normally instantiate an array of options during initialization.

Method Detail

getName

public java.lang.String getName()
Get the option name. This should be a terse name used for command line and referencing within generator code. This terse format of indicating the option should not be displayed in a wizard.


getValue

public java.lang.String getValue()
Get the option value.


setValue

public void setValue(java.lang.String value)
              throws GeneratorException
Set the option value. The value can be set when processing arguments from the command line or during the writeOptions() method of an CodeGenPanel.


setValue

public void setValue(boolean value)
Set the value as a boolean.


getDescription

public java.lang.String getDescription()
Get a string describing the option. The description is displayed by command line help and may be used for wizard panels.


isRequired

public boolean isRequired()
Flag indicating if the values needs to be set prior to generation. Ignore this flag when dealing with boolean generation options.


isPersistent

public boolean isPersistent()
Check if the option value persistent between CodeGen sessions.


getDisplayName

public java.lang.String getDisplayName()
Get name to display in Swing components.


isValue

public boolean isValue()
Get the value as a boolean.


isBoolean

public boolean isBoolean()
Determine if the option is a boolean switch.


clearValue

public void clearValue()

isEmpty

public boolean isEmpty()