public class

OwnerClass

extends Object
java.lang.Object
   ↳ com.google.gwt.uibinder.rebind.model.OwnerClass

Class Overview

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

Summary

Public Constructors
OwnerClass(JClassType ownerType, MortalLogger logger, UiBinderContext context)
Constructor.
Public Methods
JClassType getOwnerType()
JMethod getUiFactoryMethod(JClassType forType)
Returns the method annotated with @UiFactory which returns the given type.
OwnerField getUiField(String name)
Gets a field with the given name.
OwnerField getUiFieldForType(JClassType type)
This method is deprecated. This will die with BundleAttributeParser
Collection<OwnerField> getUiFields()
Returns a collection of all fields in the owner class.
List<JMethod> getUiHandlers()
Returns all the UiHandler methods defined in the owner class.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public OwnerClass (JClassType ownerType, MortalLogger logger, UiBinderContext context)

Constructor.

Parameters
ownerType the type of the owner class
Throws
UnableToCompleteException

Public Methods

public JClassType getOwnerType ()

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

public OwnerField getUiField (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

public OwnerField getUiFieldForType (JClassType type)

This method is 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

public Collection<OwnerField> getUiFields ()

Returns a collection of all fields in the owner class.

public List<JMethod> getUiHandlers ()

Returns all the UiHandler methods defined in the owner class.