Top Description Inners Fields Constructors Methods
com.sun.faces.mgbean

public abstract Class BeanBuilder

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.faces.mgbean.ErrorBean, com.sun.faces.mgbean.ManagedBeanBuilder, com.sun.faces.mgbean.ManagedListBeanBuilder, com.sun.faces.mgbean.ManagedMapBeanBuilder
Imports
com.sun.faces.RIConstants, com.sun.faces.application.ApplicationAssociate, com.sun.faces.el.ELUtils, com.sun.faces.spi.InjectionProvider, .InjectionProviderException, com.sun.faces.util.MessageUtils, .Util, .FacesLogger, javax.el.ELContext, .ValueExpression, javax.faces.context.FacesContext, java.lang.reflect.Constructor, .Modifier, java.util.ArrayList, .LinkedHashMap, .List, .Map, java.util.logging.Level, .Logger

Abstract builder for creating and populating JSF managed beans.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
BeanBuilder.Expression

This is a holder class for ValueExpressions.

Field Summary

Modifier and TypeField and Description
private boolean
private Class<?>
protected final ManagedBeanInfo
private boolean
private static Logger
private List<String>
private List<String>

Constructor Summary

AccessConstructor and Description
public
BeanBuilder(ManagedBeanInfo
the managed bean metadata
beanInfo
)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
bake()

Performs sanity checking of the ManagedBeanInfo instance provided when the BeanBuilder instance was created.

protected void
public Object
build(InjectionProvider injectionProvider, FacesContext context)

protected abstract void
buildBean(Object bean, FacesContext context)

public void
destroy(InjectionProvider injectionProvider, Object bean)

protected List<BeanBuilder.Expression>
getBakedList(String valueClass, List<String> entries)

protected Map<BeanBuilder.Expression, BeanBuilder.Expression>
getBakedMap(String keyClass, String valueClass, Map<String, String> mapEntries)

public Class<?>
public Map<String, String>
public ManagedBeanInfo
public List<String>
pack-priv List<String>
public String
public boolean
protected void
initList(List<BeanBuilder.Expression> source, List<E> target, FacesContext context)

protected void
protected void
injectResources(Object bean, InjectionProvider injectionProvider)

protected void
invokePostConstruct(Object bean, InjectionProvider injectionProvider)

public boolean
private Class<?>
protected Class<T>
loadClass(String className)

protected Object
pack-priv void
pack-priv void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bakedback to summary
private boolean baked
beanClassback to summary
private Class<?> beanClass
beanInfoback to summary
protected final ManagedBeanInfo beanInfo
isInjectibleback to summary
private boolean isInjectible
LOGGERback to summary
private static Logger LOGGER
messagesback to summary
private List<String> messages
referencesback to summary
private List<String> references

Constructor Detail

BeanBuilderback to summary
public BeanBuilder(ManagedBeanInfo beanInfo)
Parameters
beanInfo:ManagedBeanInfo

the managed bean metadata

Method Detail

bakeback to summary
pack-priv void bake()

Performs sanity checking of the ManagedBeanInfo instance provided when the BeanBuilder instance was created. If any issues are found, queue messages which will be logged when first baked and exposed as exceptions at runtime per the spec.

bakedback to summary
protected void baked()
buildback to summary
public Object build(InjectionProvider injectionProvider, FacesContext context)
buildBeanback to summary
protected abstract void buildBean(Object bean, FacesContext context)
destroyback to summary
public void destroy(InjectionProvider injectionProvider, Object bean)
getBakedListback to summary
protected List<BeanBuilder.Expression> getBakedList(String valueClass, List<String> entries)
getBakedMapback to summary
protected Map<BeanBuilder.Expression, BeanBuilder.Expression> getBakedMap(String keyClass, String valueClass, Map<String, String> mapEntries)
getBeanClassback to summary
public Class<?> getBeanClass()
getDescriptionsback to summary
public Map<String, String> getDescriptions()
getManagedBeanInfoback to summary
public ManagedBeanInfo getManagedBeanInfo()
getMessagesback to summary
public List<String> getMessages()
getReferencesback to summary
pack-priv List<String> getReferences()
getScopeback to summary
public String getScope()
hasMessagesback to summary
public boolean hasMessages()
initListback to summary
protected void initList(List<BeanBuilder.Expression> source, List<E> target, FacesContext context)
initMapback to summary
protected void initMap(Map<BeanBuilder.Expression, BeanBuilder.Expression> source, Map<K, V> target, FacesContext context)
injectResourcesback to summary
protected void injectResources(Object bean, InjectionProvider injectionProvider)
invokePostConstructback to summary
protected void invokePostConstruct(Object bean, InjectionProvider injectionProvider)
isBakedback to summary
public boolean isBaked()
loadBeanClassback to summary
private Class<?> loadBeanClass()
loadClassback to summary
protected Class<T> loadClass(String className)
newBeanInstanceback to summary
protected Object newBeanInstance()
queueMessageback to summary
pack-priv void queueMessage(String message)
queueMessagesback to summary
pack-priv void queueMessages(List<String> messages)
validateScopeback to summary
private void validateScope()
com.sun.faces.mgbean back to summary

protected Class BeanBuilder.Expression

extends Object
Class Inheritance

This is a holder class for ValueExpressions. It will try to perform static lifespan checking of the expression per the specification. If it is unable to determine the scope of the expression, validation will be deferred to runtime.

Field Summary

Modifier and TypeField and Description
private Class<?>
private String
private String[]
private boolean
private ValueExpression

Constructor Summary

AccessConstructor and Description
public
Expression(String expressionString, Class<?> expectedType)

Method Summary

Modifier and TypeMethod and Description
public Object
private void
validateLifespan(ELUtils.Scope expressionScope, boolean runtime)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expectedTypeback to summary
private Class<?> expectedType
expressionStringback to summary
private String expressionString
segmentback to summary
private String[] segment
validateLifespanRuntimeback to summary
private boolean validateLifespanRuntime
veback to summary
private ValueExpression ve

Constructor Detail

Expressionback to summary
public Expression(String expressionString, Class<?> expectedType)

Method Detail

evaluateback to summary
public Object evaluate(ELContext context)
validateLifespanback to summary
private void validateLifespan(ELUtils.Scope expressionScope, boolean runtime)