com.google.gwt.maps.jsio.rebind
Class TaskFactory

java.lang.Object
  extended by com.google.gwt.maps.jsio.rebind.TaskFactory

public class TaskFactory
extends java.lang.Object

Examines types to produce Tasks.


Nested Class Summary
static interface TaskFactory.Policy
          Defines an extraction policy when creating Tasks.
 
Field Summary
static TaskFactory.Policy EXPORTER_POLICY
           
static TaskFactory.Policy FLYWEIGHT_POLICY
           
static TaskFactory.Policy WRAPPER_POLICY
           
 
Method Summary
static java.util.Map<java.lang.String,com.google.gwt.maps.jsio.rebind.Task> extractMethods(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.typeinfo.TypeOracle typeOracle, com.google.gwt.core.ext.typeinfo.JClassType clazz, TaskFactory.Policy policy)
          Populate propertyAccessors from an array of JMethods.
protected static java.lang.String getPropertyNameFromMethod(com.google.gwt.core.ext.typeinfo.JMethod method)
          Utility method to extract the bean-style property name from a method.
protected static com.google.gwt.maps.jsio.rebind.Task getPropertyPair(java.util.Map<java.lang.String,com.google.gwt.maps.jsio.rebind.Task> propertyAccessors, java.lang.String property)
          Utility method to access a Map of String, Tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLYWEIGHT_POLICY

public static final TaskFactory.Policy FLYWEIGHT_POLICY

WRAPPER_POLICY

public static final TaskFactory.Policy WRAPPER_POLICY

EXPORTER_POLICY

public static final TaskFactory.Policy EXPORTER_POLICY
Method Detail

extractMethods

public static java.util.Map<java.lang.String,com.google.gwt.maps.jsio.rebind.Task> extractMethods(com.google.gwt.core.ext.TreeLogger logger,
                                                                                                  com.google.gwt.core.ext.typeinfo.TypeOracle typeOracle,
                                                                                                  com.google.gwt.core.ext.typeinfo.JClassType clazz,
                                                                                                  TaskFactory.Policy policy)
                                                                                           throws com.google.gwt.core.ext.UnableToCompleteException
Populate propertyAccessors from an array of JMethods.

Returns:
A Map of Strings to Tasks.
Throws:
com.google.gwt.core.ext.UnableToCompleteException

getPropertyNameFromMethod

protected static java.lang.String getPropertyNameFromMethod(com.google.gwt.core.ext.typeinfo.JMethod method)
Utility method to extract the bean-style property name from a method.

Returns:
The property name if the method's name looks like a bean property, otherwise the method's name.

getPropertyPair

protected static com.google.gwt.maps.jsio.rebind.Task getPropertyPair(java.util.Map<java.lang.String,com.google.gwt.maps.jsio.rebind.Task> propertyAccessors,
                                                                      java.lang.String property)
Utility method to access a Map of String, Tasks.

Parameters:
propertyAccessors - The Map to operate on
property - The name of the property
Returns:
A Task in the given map; created if it does not exist