Share via


AifClassGeneratorBase.generate Method [AX 2012]

Generates or regenerates the class.

Syntax

public void generate()

Run On

Called

Exceptions

Exception Condition
Error

An error is thrown if the class exists and the allowExistingClass field is false.

Error

An error is thrown if the class exists and the allowExistingClass field is false.

Remarks

This is the main method of this class which actually generates the class.

The addDeclaration method is called only if the generated class does not exist.

Apart from this, it is the responsibility of the derived class to differentiate between new or existing class scenarios.

Ideally, a derived class should override the addCustomCode method and write all its custom code there instead of override the generated method and add custom code in the overridden generate method.

See Also

Reference

AifClassGeneratorBase Class