Download Sources

com.liguorien.flex.generator.writers.as3.properties
Class BasicMapProperty

java.lang.Object
  extended by com.liguorien.flex.generator.writers.as3.BuilderPropertyWriter
      extended by com.liguorien.flex.generator.writers.as3.properties.BasicMapProperty
All Implemented Interfaces:
PropertyWriter<FlexModelBuilderHandler>
Direct Known Subclasses:
BasicMapElement, EntityMapProperty

public class BasicMapProperty
extends BuilderPropertyWriter

Version:
0.2
Author:
Nicolas Désy

Field Summary
protected  java.lang.Class<?> _entryClass
           
protected  java.lang.Class<?> _keyClass
           
 
Fields inherited from interface com.liguorien.flex.generator.writers.PropertyWriter
COMPARATOR
 
Constructor Summary
BasicMapProperty()
           
 
Method Summary
 boolean acceptProperty(java.beans.PropertyDescriptor prop, FlexModelBuilderHandler handler)
          Accepts any Map properties with FlexMap annotation.
 int getPriority()
          Returns the priority for this writer.
 void writeProperty(java.io.Writer w, FlexGenerator g, FlexModelBuilderHandler handler, java.lang.String varName, java.beans.PropertyDescriptor prop)
          Writes code to access a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_keyClass

protected java.lang.Class<?> _keyClass

_entryClass

protected java.lang.Class<?> _entryClass
Constructor Detail

BasicMapProperty

public BasicMapProperty()
Method Detail

getPriority

public int getPriority()
Description copied from interface: PropertyWriter
Returns the priority for this writer. Writer with the highest value will be the first executed.

Specified by:
getPriority in interface PropertyWriter<FlexModelBuilderHandler>
Overrides:
getPriority in class BuilderPropertyWriter
Returns:
The priority for this writer

acceptProperty

public boolean acceptProperty(java.beans.PropertyDescriptor prop,
                              FlexModelBuilderHandler handler)
Accepts any Map properties with FlexMap annotation.

Parameters:
prop - The property to check
handler - The current generator handler
Returns:
A boolean value which indicates if the writer accepts to write the property

writeProperty

public void writeProperty(java.io.Writer w,
                          FlexGenerator g,
                          FlexModelBuilderHandler handler,
                          java.lang.String varName,
                          java.beans.PropertyDescriptor prop)
                   throws java.io.IOException
Description copied from interface: PropertyWriter
Writes code to access a property.

Parameters:
w - The Writer
g - The current generator
handler - The current handler
varName - The name of variable where the property is accessed
prop - The ProspectorDescriptor of the current property
Throws:
java.io.IOException

FlexGenerator

Copyright 2006 Nicolas Désy. All rights reserved.