de.armax.ax.devtools.generator
Class AXgenCheck

java.lang.Object
  extended byde.armax.ax.devtools.generator.AXgen.AXgenSubTask
      extended byde.armax.ax.devtools.generator.AXgenCheck
All Implemented Interfaces:
AXmodelCheckerListener, java.util.EventListener

public class AXgenCheck
extends AXgen.AXgenSubTask
implements AXmodelCheckerListener

Nested element for ant task AXgen used to check a model prior to code generation.

The model checker used by this task can be configured using ant attributes

See the documentation of getter and setter methods for details on allowed and required attributes

Author:
Peter Wieland, ARMAX mindware GmbH

Constructor Summary
AXgenCheck(AXgen parent)
           
 
Method Summary
 void checkError(AXmodelElement element, java.lang.String msg)
          Called whenever an error occurres.
 void checkFinished(int result, int warnings, int errors)
          Called when a check finishes.
 void checkWarning(AXmodelElement element, java.lang.String msg)
          Called whenever a warning occurres.
 void execute(AXmodel model)
          Implementation of the subtask.
 java.lang.Class getCheckerClass()
           
 boolean isFailOnError()
           
 boolean isFailOnWarning()
           
 void setCheckerClass(java.lang.String checkerClass)
          Setter for attribute checkerClass.
 void setFailOnError(boolean failOnError)
          Setter for attribute failOnError Ant attribute conversion is used to convert the string attribute in the build.xml file to a boolean value.
 void setFailOnWarning(boolean failOnWarning)
          Setter for attribute failOnWarning.
 
Methods inherited from class de.armax.ax.devtools.generator.AXgen.AXgenSubTask
getParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AXgenCheck

public AXgenCheck(AXgen parent)
Method Detail

setFailOnWarning

public void setFailOnWarning(boolean failOnWarning)

Setter for attribute failOnWarning.

Ant attribute conversion is used to convert the string attribute in the build.xml file to a boolean value. See the ant documentation for details

If this is set to true, warnings will cause the build to stop. The default value is false


isFailOnWarning

public boolean isFailOnWarning()

setFailOnError

public void setFailOnError(boolean failOnError)

Setter for attribute failOnError

Ant attribute conversion is used to convert the string attribute in the build.xml file to a boolean value. See the ant documentation for details

If this is set to false, the build process will continue despite model errors. The default value is true


isFailOnError

public boolean isFailOnError()

setCheckerClass

public void setCheckerClass(java.lang.String checkerClass)

Setter for attribute checkerClass.

This attribute must contain the fully qualified name of a class that inherits from AXmodelChecker.

The default value is AXojbHelper.class


getCheckerClass

public java.lang.Class getCheckerClass()

execute

public void execute(AXmodel model)
             throws org.apache.tools.ant.BuildException
Description copied from class: AXgen.AXgenSubTask

Implementation of the subtask. This will be executed when the parent task is executed. The execution order of subtasks is the order they appear in the build.xml file

Specified by:
execute in class AXgen.AXgenSubTask
Throws:
org.apache.tools.ant.BuildException

checkWarning

public void checkWarning(AXmodelElement element,
                         java.lang.String msg)
Description copied from interface: AXmodelCheckerListener

Called whenever a warning occurres.

Specified by:
checkWarning in interface AXmodelCheckerListener
Parameters:
element - the model element, were the warning occured
msg - a describptive message

checkError

public void checkError(AXmodelElement element,
                       java.lang.String msg)
Description copied from interface: AXmodelCheckerListener

Called whenever an error occurres.

Specified by:
checkError in interface AXmodelCheckerListener
Parameters:
element - the model element, were the error occured
msg - a describptive message

checkFinished

public void checkFinished(int result,
                          int warnings,
                          int errors)
Description copied from interface: AXmodelCheckerListener

Called when a check finishes.

Specified by:
checkFinished in interface AXmodelCheckerListener
Parameters:
result - the result code. One of AXmodelChecker.RESULT_OK, AXmodelChecker.RESULT_WARNINGS or AXmodelChecker.RESULT_ERRORS.
warnings - the number of warnings
errors - the number of errors


Copyright © 2003 ARMAX mindware GmbH. All Rights Reserved.