Download Sources

com.liguorien.flex.generator.handlers
Class FlexModelHandler

java.lang.Object
  extended by com.liguorien.flex.generator.handlers.AbstractGeneratorHandler<FlexModelHandler>
      extended by com.liguorien.flex.generator.handlers.FlexModelHandler
All Implemented Interfaces:
FlexGeneratorHandler

public class FlexModelHandler
extends AbstractGeneratorHandler<FlexModelHandler>

Generates ActionScript version of the Java entities.

Version:
0.2
Author:
Nicolas Désy

Constructor Summary
FlexModelHandler()
          create a new instance of FlexModelHandler
 
Method Summary
protected  void appendExtension(java.lang.StringBuilder buffer)
          Append ".as"
 ClassType getClassType()
          Get the ClassType for this handler.
 ClassWriter getClassWriter()
          Get the ClassWriter of this handler.
 java.lang.String getDefaultEvent()
          Return the default event for bindable properties.
 java.io.File getOutputDirectory()
          Return the output directory of this handler
 void handleClassBegin(java.lang.Class<?> clazz)
          Invoked when the generator begin a new class.
 boolean isBindingEverything()
          Determine if all properties of the class should be bindable
 
Methods inherited from class com.liguorien.flex.generator.handlers.AbstractGeneratorHandler
addContextMethodWriter, addImport, addMethodWriter, addPropertyWriter, appendClassPrefix, appendClassSuffix, clearImports, getAttributes, getClassName, getContextMethodWriters, getCurrentClass, getElements, getGenerator, getImports, getMethodWriters, getPropertyWriters, getRelativeFilePath, getWriter, handleClassBegin, handleClassEnd, handleClassEnd, handleProperty, initWriter, resetImports, setGenerator, setWriter, writeClassName, writeDocumentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlexModelHandler

public FlexModelHandler()
create a new instance of FlexModelHandler

Method Detail

isBindingEverything

public boolean isBindingEverything()
Determine if all properties of the class should be bindable

Returns:
A boolean which indicate if all properties of the class should be bindable

getDefaultEvent

public java.lang.String getDefaultEvent()

Return the default event for bindable properties. It's declared on the Java entity class with the FlexBindable annotation.

Returns:
The default event.

getClassType

public ClassType getClassType()
Description copied from class: AbstractGeneratorHandler

Get the ClassType for this handler.

Specified by:
getClassType in interface FlexGeneratorHandler
Specified by:
getClassType in class AbstractGeneratorHandler<FlexModelHandler>
Returns:
ClassType.CLIENT_ENTITIES
See Also:
ClassType

handleClassBegin

public void handleClassBegin(java.lang.Class<?> clazz)
Description copied from interface: FlexGeneratorHandler
Invoked when the generator begin a new class.

Parameters:
clazz - The class which the generator is parsing.

getOutputDirectory

public java.io.File getOutputDirectory()
Description copied from class: AbstractGeneratorHandler

Return the output directory of this handler

Specified by:
getOutputDirectory in class AbstractGeneratorHandler<FlexModelHandler>
Returns:
A File object which represent the root of output directory

appendExtension

protected void appendExtension(java.lang.StringBuilder buffer)
Append ".as"

Specified by:
appendExtension in class AbstractGeneratorHandler<FlexModelHandler>
Parameters:
buffer - The buffer which the extension must be appended.

getClassWriter

public ClassWriter getClassWriter()
Description copied from class: AbstractGeneratorHandler

Get the ClassWriter of this handler.

Specified by:
getClassWriter in class AbstractGeneratorHandler<FlexModelHandler>
Returns:
AS3Writer.getContextWriter()
See Also:
ClassWriter

FlexGenerator

Copyright 2006 Nicolas Désy. All rights reserved.