Uses of Class
jfun.yan.Component

Packages that use Component
jfun.yan Basic component combinators and containers. 
jfun.yan.containers This package provides some pre-built container classes. 
jfun.yan.etc This package provides helper classes that provide some not-so-common but could-be-useful features including the "byName" mode in the Spring framework and dependency injection support for rich domain objects that are not instantiated by Yan. 
jfun.yan.etc.injection This package provides a simple solution for dependency injection into objects created outside of the container. 
jfun.yan.lifecycle This package provides a solution for life cycle management to Yan container framework. 
jfun.yan.monitoring This package provides a solution for component monitoring to Yan container framework. 
jfun.yan.spring This package provides Spring integration support. 
jfun.yan.util Some utility classes used by Yan. 
jfun.yan.web This package provides web integration for Yan. 
jfun.yan.xfire This package provides xfire integration for Yan. 
jfun.yan.xml This package provides a xml configuration support for Yan Container. 
jfun.yan.xml.nut This package provides the basic Nut classes and introspection utility class. 
jfun.yan.xml.nuts This package provides standard Nut classes. 
jfun.yan.xml.nuts.optional This package provides some optional Nut classes that can be loaded manually from the config file. 
jfun.yan.xml.nuts.spring This package provides Nut classes that are aware of Spring beans
 
 

Uses of Component in jfun.yan
 

Subclasses of Component in jfun.yan
 class Creator2Component<T>
          To adapt a Creator object to Component.
 class DecoratingComponent
          Base class for component decorators that do not change the result returned from the target component it decorates and causes no side-effect by itself other than those caused by the target component.
 class DelegatingComponent
          Base class for delegating Component object.
 class SimpleComponent<T>
          This abstract class provides a convenient way to create Component implementations that do not have dependencies to resolve.
 

Methods in jfun.yan that return Component
static
<T> Component<T>
Components.adapt(Creator<T> c)
          To adapt a Creator object to a Component object.
static
<T> Component<T[]>
Components.array(Component<T>... ccs)
          Create a Component object that creates an array as instance.
static
<T> Component<T[]>
Components.array(Component<T>[] ccs, java.lang.Class<T> etype)
          Create a Component object that creates an array as instance.
static
<T> Component<T>
Components.autodetect(java.lang.Class<T> type, java.lang.Object[] alternative_keys)
          Create a Component object that delegates to another component in the current container.
static Component Components.autowired(Component c)
          To create a Component that ignores all subsequent customizations to the parameters or properties.
 Component<T> Component.bean()
          Create a Component object that calls Java Bean setters after an instance is created by this Component object.
static
<T> Component<T>
Components.bean(java.lang.Class<T> type)
          Create a Component object that uses Java Bean convention to create instance.
static
<T> Component<T>
Components.bean(java.lang.Class<T> type, java.util.Set props)
          Create a Component object that uses Java Bean convention to create instance.
static
<T> Component<T>
Components.bean(java.lang.Class<T> type, java.lang.String[] props)
          Create a Component object that uses Java Bean convention to create instance.
static
<T> Component<T>
Components.bean(Component<T> cc)
          Create a new Component object from a base Component object that calls Java Bean setters after the base Component creates the instance.
static
<T> Component<T>
Components.bean(Component<T> cc, java.util.Set props)
          Create a new Component object from a base Component object that calls Java Bean setters after the base Component creates the instance.
static
<T> Component<T>
Components.bean(Component<T> cc, java.lang.String[] props)
          Create a new Component object from a base Component object that calls Java Bean setters after the base Component creates the instance.
 Component<T> Component.bean(java.util.Set props)
          Create a Component object that calls Java Bean setters after an instance is created by this Component.
 Component<T> Component.bean(java.lang.String[] props)
          Create a Component object that calls Java Bean setters after an instance is created by this Component.
<To> Component<To>
Component.bind(Binder<T,To> binder)
          Monadic 'bind' operation.
<To> Component<To>
Component.bind(ComponentBinder<T,To> binder)
          Monadic 'bind' operation.
static
<From,To> Component<To>
Monad.bind(Creator<From> c1, Binder<From,To> binder)
          Monadic 'bind' operation.
static
<From,To> Component<To>
Monad.bind(Creator<From> c1, ComponentBinder<From,To> binder)
          Monadic 'bind' operation.
static Component Components.bindArgument(Component cc, int k, ParameterBinder binder)
          Customize one argument of a component with a ParameterBinder object.
 Component<T> Component.bindArgument(int k, ParameterBinder binder)
          Create a new Component object that uses a given ParameterBinder object to create one of its argument identified by its ordinal position.
static Component Components.bindArguments(Component cc, ParameterBinder binder)
          Customize the arguments of a component with a ParameterBinder object.
 Component<T> Component.bindArguments(ParameterBinder binder)
          Create a new Component object that uses given ParameterBinder object to create its parameters.
static Component Components.bindField(Component cc, java.lang.reflect.Field fld)
          Creates a Component that will read a certain field from the instance created by another Component.
static Component Components.bindField(Component cc, java.lang.String name, boolean suppress_security)
          Creates a Component that will read a certain field from the instance created by another Component.
static Component Components.bindGetter(Component cc, java.lang.String name)
          Create a Component that will return a bean property of the instance created by another component.
static Component Components.bindGetter(Component cc, java.lang.String name, int ind)
          Create a Component that will get an indexed property of the Java Bean instance created by another component.
static Component Components.bindMethod(Component cc, java.lang.reflect.Method mtd)
          Creates a Component that will call a certain method against the instance created by another Component.
static Component Components.bindMethod(Component cc, java.lang.String name, boolean suppress_security)
          Creates a Component that will call a certain method against the instance created by another Component.
static Component Components.bindMethod(Component cc, java.lang.String name, java.lang.Class[] param_types, boolean suppress_security)
          Creates a Component that will call a certain method against the instance created by another Component.
static Component Components.bindMethod(Component cc, java.lang.String name, int param_count, boolean suppress_security)
          Creates a Component that will call a certain method against the instance created by another Component.
static Component Components.bindProperties(Component cc, PropertyBinder binder)
          Customize the properties of a component with a PropertyBinder object.
 Component<T> Component.bindProperties(PropertyBinder binder)
          Create a new Component object that uses given PropertyBinder object to create its properties.
static Component Components.bindProperty(Component cc, java.lang.Object k, PropertyBinder binder)
          Customize the properties of a component with a PropertyBinder object.
 Component<T> Component.bindProperty(java.lang.Object k, PropertyBinder binder)
          Create a new Component object that uses given PropertyBinder object to create one of its property identified by a property key.
static
<T> Component<T>
Components.bindSetter(Component<T> cc, java.lang.String name, int ind)
          Create a Component that will set an indexed property of the Java Bean instance created by another component.
static Component Components.bindSetter(Component cc, java.lang.String name)
          Create a Component that will set a bean property of the instance created by another component.
<X> Component<X>
Component.cast(java.lang.Class<X> type)
          Create a new Component object that returns the given type as its component instance type when getType() or verify(Dependency) is called.
static
<T> Component<T>
Components.cast(Component<?> cc, java.lang.Class<T> type)
          Customizes a Component object with a new component type.
static
<T> Component<T>
Components.ctor(java.lang.Class<T> c)
          Create a Component object that uses the constructor of a class to create instance of that class.
static
<T> Component<T>
Components.ctor(java.lang.Class<T> c, java.lang.Class[] param_types)
          Create a Component that uses one constructor of a class to create instance of that class.
protected abstract  Component DecoratingComponent.decorate(Component c)
          Decorate a Component object.
 Component<T> LazyComponent.eval()
          Evaluate the Component object.
 Component<Factory<T>> Component.factory()
          Create a Component that instantiates the Factory interface.
<F> Component<F>
Component.factory(java.lang.Class<F> factory_type)
          Create a Component that instantiates a factory interface.
<F> Component<F>
Component.factory(java.lang.Class<F> factory_type, java.lang.ClassLoader loader, java.lang.String toString)
          Create a Component that instantiates a factory interface.
<F> Component<F>
Component.factory(java.lang.Class<F> factory_type, java.lang.String toString)
          Create a Component that instantiates a factory interface.
static
<T> Component<Factory<T>>
Components.factory(Creator<T> cc, java.lang.String toString)
          Create a Component that instantiates the Factory interface.
static
<F> Component<F>
Components.factory(Creator cc, java.lang.Class<F> factory_class, java.lang.ClassLoader loader, java.lang.String toString)
          Create a Component that instantiates a factory interface.
static
<F> Component<F>
Components.factory(Creator cc, java.lang.Class<F> factory_class, java.lang.String toString)
          Create a Component that instantiates a factory interface.
 Component<Factory<T>> Component.factory(java.lang.String toString)
          Create a Component that instantiates the Factory interface.
static Component Monad.fail(java.lang.String msg)
          Create a Component that always fails.
static Component Components.field(java.lang.Class type, java.lang.Object obj, java.lang.String name)
          Create a Component object that reads a field from a given object to create component instance.
 Component Component.field(java.lang.reflect.Field fld)
          Creates a Component that will read a certain field from the instance created by this Component.
static Component Components.field(java.lang.Object obj, java.lang.String name)
          Create a Component object that reads a field from a given object to create component instance.
 Component Component.field(java.lang.String name)
          Creates a Component that will read a public field from the instance created by this Component.
 Component Component.field(java.lang.String name, boolean suppress_security)
          Creates a Component that will read a field from the instance created by this Component.
 Component<T> Component.followedBy(Binder<T,?> binder)
          Create a staged component.
static
<T> Component<T>
Monad.followedBy(Component<T> c1, Binder<T,?> binder)
          Create a staged component.
static
<T> Component<T>
Monad.followedBy(Component<T> c1, ComponentBinder<T,?> binder)
          Create a staged component.
static
<T> Component<T>
Monad.followedBy(Component<T> c1, Creator<?> c2)
          Create a staged component.
 Component<T> Component.followedBy(ComponentBinder<T,?> binder)
          Create a staged component.
 Component<T> Component.followedBy(Creator<?> c2)
          Create a staged component.
static Component Components.fromArguments(Component cc, java.lang.Object[] keys)
          Redirects resolution of properties to arguments.
 Component<T> Component.fromArguments(java.lang.Object[] keys)
          Redirects resolution of properties to arguments.
static
<T> Component<T>
Components.fromLazy(LazyComponent<T> lcc, java.lang.Object key)
          Adapt a LazyComponent object to Component.
static Component Components.fromProperties(Component cc, java.lang.Object[] keys)
          Redirects resolution of arguments to properties.
 Component<T> Component.fromProperties(java.lang.Object[] keys)
          Redirects resolution of arguments to properties.
static
<T> Component<T>
Components.fun(Function<T> fun)
          Create a Component object that uses a Function to create instance.
static Component Components.get(Component c, java.lang.Object key)
          To create a Component object that calls method "get" against the java.util.Map object instantiated by another Component.
 Component DelegatingComponentMap.getComponent(java.lang.Object key)
           
 Component ComponentMap.getComponent(java.lang.Object key)
          Gets a Component identified by a key.
 Component DelegatingComponentMap.getComponentOfType(java.lang.Class type)
           
<T> Component<T>
ComponentMap.getComponentOfType(java.lang.Class<T> type)
          Gets a Component object of a certain type.
protected  Component DelegatingComponent.getDelegateTarget()
          Gets the Component object being delegated.
static Component Components.getter(java.lang.Class type, java.lang.Object obj, java.lang.String prop)
          Create a Component that calls a property getter of an object.
static Component Components.getter(java.lang.Object obj, java.lang.String prop)
          Create a Component that calls a property getter of an object.
 Component Component.getter(java.lang.String name)
          Create a Component that will return a bean property of the instance created by this component.
 Component Component.getter(java.lang.String name, int ind)
          Create a Component that will get an indexed property of the Java Bean instance created by this component.
 Component DecoratingComponent.guard()
           
 Component<T> Component.guard()
          Decorate this Component so that the new Component object guards against infinite dependency loop.
static
<T> Component<T>
Components.guard(Component<T> cc)
          Decorate a Component object so that the new Component object guards against infinite dependency loop.
static
<K,T> Component<java.util.LinkedHashMap<K,T>>
Components.hashmap(K[] keys, Creator<T>[] creators)
          Create a Component object that creates a java.util.LinkedHashMap object.
static
<T> Component<java.util.HashSet<T>>
Components.hashset(Creator<T>... ccs)
          Create a Component object that creates java.util.HashSet.
<R> Component<R>
Component.ifelse(Component<R> yes, Component<R> no)
          Create a Component object according to the boolean value returned from this Component.
static
<T> Component<T>
Monad.ifelse(Creator<java.lang.Boolean> cond, Component<T> a, Component<T> b)
          Create a Component object according to the boolean value returned from another Component.
 Component<T> Component.ignoreProperty(java.lang.Object key)
          Ignore the property identified by a key and use the default mechanism.
 Component<T> Component.incomplete()
          By default, all components depended by this component will be verified when this component is verified.
static
<T> Component<T>
Components.incomplete(Component<T> cc)
          By default, all components depended by a component will be verified when the component is verified.
static Component Components.indexed_getter(java.lang.Class type, java.lang.Object obj, java.lang.String prop, int ind)
          Create a Component that calls an indexed property getter of an object.
static Component Components.indexed_getter(java.lang.Object obj, java.lang.String prop, int ind)
          Create a Component that calls an indexed property getter of an object.
static
<T> Component<T>
Components.indexed_setter(java.lang.Class type, T obj, java.lang.String prop, int ind)
          Create a Component that calls an indexed property setter against an object.
static
<T> Component<T>
Components.indexed_setter(T obj, java.lang.String prop, int ind)
          Create a Component that calls an indexed property setter against an object.
 Component<T> Component.label()
          Label the frame for this Component so that whenever a YanException is thrown, the component itself will be populated in the resolution trace.
static
<T> Component<T>
Components.label(Component<T> cc, java.lang.Object lbl)
          Label the frame for a Component so that whenever a YanException is thrown, the provided label will be populated in the resolution trace.
 Component<T> Component.label(java.lang.Object lbl)
          Label the frame for this Component so that whenever a YanException is thrown, the provided label will be populated in the resolution trace.
static
<T> Component<java.util.ArrayList<T>>
Components.list(Creator<T>... ccs)
          Create a Component object that creates java.util.ArrayList.
static
<T,C extends Creator<T>>
Component<java.util.ArrayList<T>>
Components.list(java.util.List<C> ccs)
          Create a Component object that creates java.util.ArrayList.
static
<T> Component<T>
Components.makeBean(Component<T> cc, PropertiesInjector injector)
          Create a Bean component that calls a PropertiesInjector to inject bean properties to the bean instance.
static
<T> Component<T>
Components.makeBean(java.lang.String name, Component<T> cc, PropertiesInjector injector)
          Create a Bean component that calls a PropertiesInjector to inject bean properties to the bean instance.
static
<A,B,C,D,E,R>
Component<R>
Monad.map(Creator<A> c1, Creator<B> c2, Creator<C> c3, Creator<D> c4, Creator<E> c5, Map5<A,B,C,D,E,R> m)
          Creates a Component object which takes instances created from five other Creator object and transforms them to a new Object.
static
<A,B,C,D,R>
Component<R>
Monad.map(Creator<A> c1, Creator<B> c2, Creator<C> c3, Creator<D> c4, Map4<A,B,C,D,R> m)
          Creates a Component object which takes instances created from four other Creator object and transforms them to a new Object.
static
<A,B,C,R> Component<R>
Monad.map(Creator<A> c1, Creator<B> c2, Creator<C> c3, Map3<A,B,C,R> m)
          Creates a Component object which takes instances created from three other Creator object and transforms them to a new Object.
static
<A,B,R> Component<R>
Monad.map(Creator<A> c1, Creator<B> c2, Map2<A,B,R> m)
          Creates a Component object which takes instances created from two other Creator object and transforms them to a new Object.
static
<From,To> Component<To>
Monad.map(Creator<From> cc, Map<From,To> m)
          Customizes a Component object so that upon creation, the new Component object transforms the result component instance to another instance.
<To> Component<To>
Component.map(Map<T,To> m)
          Create a new Component that upon creation, transforms the component instance to another instance.
static Component Components.method(java.lang.Class type, java.lang.Object obj, java.lang.String name)
          Create a Component object that invokes a method against a given object to create component instance.
static Component Components.method(java.lang.Class type, java.lang.Object obj, java.lang.String name, java.lang.Class[] param_types)
          Create a Component object that invokes a method against a given object to create component instance.
 Component Component.method(java.lang.reflect.Method mtd)
          Creates a Component that will call a certain method against the instance created by this Component.
static Component Components.method(java.lang.Object obj, java.lang.String name)
          Create a Component object that invokes a method against a given object to create component instance.
static Component Components.method(java.lang.Object obj, java.lang.String name, java.lang.Class[] param_types)
          Create a Component object that invokes a method against a given object to create component instance.
 Component Component.method(java.lang.String name)
          Creates a Component that will call a certain public method against the instance created by this Component.
 Component Component.method(java.lang.String name, boolean suppress_security)
          Creates a Component that will call a certain method against the instance created by this Component.
 Component Component.method(java.lang.String name, java.lang.Class[] param_types)
          Creates a Component that will call a certain public method against the instance created by this Component.
 Component Component.method(java.lang.String name, java.lang.Class[] param_types, boolean suppress_security)
          Creates a Component that will call a certain method against the instance created by this Component.
static
<T> Component<T>
Monad.mplus(Creator<T> c1, Creator<T> c2)
          The monadic mplus operation, when the first component fails with resolution error, an alternative component is tried instead.
static
<T> Component<T>
Components.mutate(Component<T> cc, Mutation<T> m)
          Customizes a Component object so that upon creation, the new Component object mutates the result component instance before it is returned.
 Component<T> Component.mutate(Mutation<T> m)
          Create a new Component that upon creation, mutates the component instance before it is returned.
static Component Monad.mzero()
          Create a monadic mzero Component that always fails.
 Component<T> Component.option(T val)
          Creates an optional Component.
 Component<T> Component.optional()
          Creates an optional Component.
static
<T> Component<T>
Components.optionalParameter(Component<T> cc, int k)
          Creates a new Component object that makes a parameter optional.
 Component<T> Component.optionalParameter(int ind)
          Make a parameter optional, so that when the argument cannot be resolved or any of its subcomponent cannot be resolved, the default value is used instead.
 Component<T> Component.optionalParameters()
          Make sure the parameters are optional.
static
<T> Component<T>
Components.optionalParameters(Component<T> cc)
          Make sure the parameters of a component are optional.
 Component<T> Component.optionalProperties()
          Make sure the properties are optional.
static
<T> Component<T>
Components.optionalProperties(Component<T> cc)
          Make sure the properties of a Java bean component are optional.
static
<T> Component<T>
Components.optionalProperty(Component<T> cc, java.lang.Object k)
          Creates a new Component object that makes a property identified by a key optional.
 Component<T> Component.optionalProperty(java.lang.Object key)
          Make a property identified by a key optional, so that when the property cannot be resolved or any of its subcomponent cannot be resolved, the default value is used instead.
 Component DecoratingComponent.proxy()
           
 Component Component.proxy()
          Create a new Component object that uses dynamic proxy to transform the return value 'this' Component creates to a dynamic proxy.
 Component DecoratingComponent.proxy(java.lang.Class itf)
           
 Component DecoratingComponent.proxy(java.lang.Class[] itfs)
           
 Component Component.proxy(java.lang.Class[] itfs)
          Create a new Component object that uses dynamic proxy to transform the return value 'this' Component creates to a dynamic proxy.
<I> Component<I>
Component.proxy(java.lang.Class<I> itf)
          Create a new Component object that uses dynamic proxy to transform the return value 'this' Component creates to a dynamic proxy.
static Component Components.proxy(Component cc)
          Customizes a Component object so that the new Component object will return a dynamic proxy and hide the real component instance.
static
<I> Component<I>
Components.proxy(Component<?> cc, java.lang.Class<I> itf)
          Customizes a Component object so that the new Component object will return a dynamic proxy and hide the real component instance.
static Component Components.proxy(Component cc, java.lang.Class[] itfs)
          Customizes a Component object so that the new Component object will return a dynamic proxy and hide the real component instance.
static Component Components.proxy(Component cc, java.lang.Class[] itfs, java.lang.ClassLoader loader)
          Customizes a Component object so that the new Component object will return a dynamic proxy and hide the real component instance.
static
<T> Component<T>
Monad.recover(Creator<T> c1, Recovery<T> r)
          Create a new Component object that will recover errors happened from the provided Component.
 Component<T> Component.recover(Recovery<T> r)
          Create a new Component object that will recover errors happened from this Component.
static
<T> Component<T>
Components.repeat(Creator<T> cc, int times)
          Create a Component that repeatedly call another Component for certain amount of times.
 Component<T> Component.repeat(int times)
          Create a new Component that repeatedly call this Component for certain amount of times.
static Component Components.returnState(Stateful st)
          Create a Component object that returns the state of a Stateful object as its component instance.
static Component Components.returnType(Typeful t)
          Create a Component object that returns the type of a Typeful object as its component instance.
static Component Components.returnVerification(Verifiable veri)
          Create a Component object that verifies the Verifiable object and returns the result type as return value.
 Component<T> Component.seal()
          Create a sealed component.
static Component Components.seal(Component cc)
          Create a sealed component.
static
<A,B> Component<B>
Monad.seq(Creator<A> c1, Creator<B> c2)
          Monadic 'sequence' operation.
<R> Component<R>
Component.seq(Creator<R> c2)
          Monadic 'sequence' operation.
static
<T> Component<T>
Monad.sequence(Creator<T>... ccs)
          Monadic 'sequence' operator that sequentially execute an array of components and keep the result of the last one.
static
<T> Component<T>
Components.setter(java.lang.Class type, T obj, java.lang.String prop)
          Create a Component that calls a property setter against an object.
 Component<T> Component.setter(java.lang.String name)
          Create a Component that will set a bean property of the instance created by this component.
 Component<T> Component.setter(java.lang.String name, int ind)
          Create a Component that will set an indexed property of the Java Bean instance created by this component.
static
<T> Component<T>
Components.setter(T obj, java.lang.String prop)
          Create a Component that calls a property setter against an object.
 Component DecoratingComponent.singleton()
           
 Component<T> Component.singleton()
          Create a new Component that utilizes singleton pattern when creating instance.
static
<T> Component<T>
Components.singleton(Component<T> cc)
          Create a new Component object that utilizes singleton pattern.
static
<T> Component<T>
Components.singleton(Component<T> cc, Pool<T> scope)
          Create a new Component object that utilizes singleton pattern within the scope of the provided Pool object.
 Component DecoratingComponent.singleton(Pool scope)
           
 Component<T> Component.singleton(Pool scope)
          Create a new Component that utilizes singleton pattern within a scope specified by the provided Pool object when creating instance.
static Component Components.static_field(java.lang.Class c, java.lang.String name)
          Create a Component object that reads a static field to create instance.
static Component Components.static_method(java.lang.Class c, java.lang.String name)
          Create a Component object that invokes a static method to create instance.
static Component Components.static_method(java.lang.Class c, java.lang.String name, java.lang.Class[] param_types)
          Create a Component object that invokes a static method to create instance.
static
<T> Component<T[]>
Components.storeArray(Component<T[]> component_returning_array, Creator<T>... creators)
           
static