com.carbonfive.flash
Class TranslationFilter

java.lang.Object
  extended by com.carbonfive.flash.TranslationFilter
All Implemented Interfaces:
java.io.Serializable

public class TranslationFilter
extends java.lang.Object
implements java.io.Serializable

TranslationFilter holds classes and properties that should be ignored during a translation to Action Script. Encoders ask TranslationFilter whether they should ignore these classes and properties as they encode Java objects.

The TranslationFilter understands class hierarchy, so if ignoreClass("java.lang.Number") is called, a subsequent call to doIgnoreClass(Double.class) will return true. Similarly with doIgnoreProperty().

See Also:
Serialized Form

Method Summary
 boolean doIgnoreClass(java.lang.Class klass)
          Whether or not to ignore the specified class.
 boolean doIgnoreProperty(java.lang.Class klass, java.lang.String property)
          Whether or not to ignore the specified property.
static TranslationFilter getBaseFilter()
          Generated a base TranslationFilter object.
 void ignoreClass(java.lang.Class klass)
          Ignore a specific class, and all subclasses.
 void ignoreProperty(java.lang.Class klass, java.lang.String property)
          Ignore a specific properties, including in all subclasses.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBaseFilter

public static TranslationFilter getBaseFilter()
Generated a base TranslationFilter object. This TranslationFilter includes the following dangerous properties: These properties will result in an infinite loop during translation.

Returns:
the base TranslationFilter

ignoreClass

public void ignoreClass(java.lang.Class klass)
Ignore a specific class, and all subclasses.

Parameters:
klass - the class to ignore

ignoreProperty

public void ignoreProperty(java.lang.Class klass,
                           java.lang.String property)
Ignore a specific properties, including in all subclasses.

The property is described by its name, as defined by the Jakarata Commons BeanUtils project.
See Jakarata Commons BeanUtils

Parameters:
klass - the class with the property to ignore
property - the name of the property to ignore

doIgnoreClass

public boolean doIgnoreClass(java.lang.Class klass)
Whether or not to ignore the specified class.

Parameters:
klass - the class in question
Returns:
true or false

doIgnoreProperty

public boolean doIgnoreProperty(java.lang.Class klass,
                                java.lang.String property)
Whether or not to ignore the specified property.

Parameters:
klass - the class of the property in question
property - the property in question
Returns:
true or false