com.google.gwt.uibinder.rebind.model
Class OwnerClass

java.lang.Object
  extended by com.google.gwt.uibinder.rebind.model.OwnerClass

public class OwnerClass
extends java.lang.Object

Model class with all attributes of the owner class. This includes factories, fields and handlers.


Constructor Summary
OwnerClass(JClassType ownerType, MortalLogger logger)
          Constructor.
 
Method Summary
 JMethod getUiFactoryMethod(JClassType forType)
          Returns the method annotated with @UiFactory which returns the given type.
 OwnerField getUiField(java.lang.String name)
          Gets a field with the given name.
 OwnerField getUiFieldForType(JClassType type)
          Deprecated. This will die with BundleAttributeParser
 java.util.Collection<OwnerField> getUiFields()
          Returns a collection of all fields in the owner class.
 java.util.List<JMethod> getUiHandlers()
          Returns all the UiHandler methods defined in the owner class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwnerClass

public OwnerClass(JClassType ownerType,
                  MortalLogger logger)
           throws UnableToCompleteException
Constructor.

Parameters:
ownerType - the type of the owner class
logger -
Throws:
UnableToCompleteException
Method Detail

getUiFactoryMethod

public JMethod getUiFactoryMethod(JClassType forType)
Returns the method annotated with @UiFactory which returns the given type.

Parameters:
forType - the type to look for a factory of
Returns:
the factory method, or null if none exists

getUiField

public OwnerField getUiField(java.lang.String name)
Gets a field with the given name. It's important to notice that a field may not exist on the owner class even if it has a name in the XML and even has handlers attached to it - such a field will only exist in the generated binder class.

Parameters:
name - the name of the field to get
Returns:
the field descriptor, or null if the owner doesn't have that field

getUiFieldForType

@Deprecated
public OwnerField getUiFieldForType(JClassType type)
Deprecated. This will die with BundleAttributeParser

Gets the field with the given type. Note that multiple fields can have the same type, so it only makes sense to call this to retrieve resource fields, such as messages and image bundles, for which only one instance is expected.

Parameters:
type - the type of the field
Returns:
the field descriptor

getUiFields

public java.util.Collection<OwnerField> getUiFields()
Returns a collection of all fields in the owner class.


getUiHandlers

public java.util.List<JMethod> getUiHandlers()
Returns all the UiHandler methods defined in the owner class.