Errai 3.0.1-SNAPSHOT

org.jboss.errai.databinding.rebind
Class DataBindingUtil

java.lang.Object
  extended by org.jboss.errai.databinding.rebind.DataBindingUtil

public class DataBindingUtil
extends Object

Utility to retrieve a data binder reference. The reference is either to an injected AutoBound data binder or to a generated data binder for an injected Model.

Author:
Christian Sadilek , Mike Brock

Nested Class Summary
static class DataBindingUtil.DataBinderRef
          Represents a reference to an injected or generated data binder.
 
Field Summary
static String BINDER_MODEL_TYPE_VALUE
           
static Annotation[] MODEL_QUALIFICATION
           
static String TRANSIENT_BINDER_VALUE
           
 
Method Summary
static Set<MetaClass> getAllBindableTypes(com.google.gwt.core.ext.GeneratorContext context)
          Returns all bindable types on the classpath.
static Set<MetaClass> getConfiguredBindableTypes()
          Reads bindable types from all ErraiApp.properties files on the classpath.
static boolean isBindableType(MetaClass type)
          Checks if the provided type is bindable.
static DataBindingUtil.DataBinderRef lookupDataBinderRef(InjectableInstance<?> inst)
          Tries to find a data binder reference for either an injected Model or an injected AutoBound data binder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSIENT_BINDER_VALUE

public static final String TRANSIENT_BINDER_VALUE
See Also:
Constant Field Values

BINDER_MODEL_TYPE_VALUE

public static final String BINDER_MODEL_TYPE_VALUE
See Also:
Constant Field Values

MODEL_QUALIFICATION

public static final Annotation[] MODEL_QUALIFICATION
Method Detail

lookupDataBinderRef

public static DataBindingUtil.DataBinderRef lookupDataBinderRef(InjectableInstance<?> inst)
Tries to find a data binder reference for either an injected Model or an injected AutoBound data binder.

Parameters:
inst - the injectable instance
Returns:
the data binder reference or null if not found.

isBindableType

public static boolean isBindableType(MetaClass type)
Checks if the provided type is bindable.

Parameters:
type - the type to check
Returns:
true if the provide type is bindable, otherwise false.

getAllBindableTypes

public static Set<MetaClass> getAllBindableTypes(com.google.gwt.core.ext.GeneratorContext context)
Returns all bindable types on the classpath.

Parameters:
context - the current generator context
Returns:
a set of meta classes representing the all bindable types (both annotated and configured in ErraiApp.properties).

getConfiguredBindableTypes

public static Set<MetaClass> getConfiguredBindableTypes()
Reads bindable types from all ErraiApp.properties files on the classpath.

Returns:
a set of meta classes representing the configured bindable types.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.