|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Creator | |
|---|---|
| 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. |
| Uses of Creator in jfun.yan |
|---|
| Classes in jfun.yan that implement Creator | |
|---|---|
class |
Component<T>
Responsible for component instance creation and verification. |
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 with type parameters of type Creator | ||
|---|---|---|
static
|
Components.list(java.util.List<C> ccs)
Create a Component object that creates java.util.ArrayList. |
|
| Methods in jfun.yan that return Creator | |
|---|---|
Creator |
PropertyBinder.bind(java.lang.Class component_type,
java.lang.Object key,
java.lang.Class type)
|
Creator<To> |
Binder.bind(From v)
Creates a Creator object according to a value. |
Creator<L> |
StoreBinder.bind(L v)
|
Creator<T> |
ParameterBinder.bind(Signature src,
int ind,
java.lang.Class<T> type)
|
protected Creator<T> |
Creator2Component.getCreator()
Gets the Creator object adapted. |
Creator<T>[] |
StoreBinder.getProducers()
|
Creator<T> |
Recovery.recover(java.lang.RuntimeException e)
recover from an error. |
| Methods in jfun.yan with parameters of type Creator | ||
|---|---|---|
static
|
Components.adapt(Creator<T> c)
To adapt a Creator object to a Component object. |
|
static
|
Monad.bind(Creator<From> c1,
Binder<From,To> binder)
Monadic 'bind' operation. |
|
static
|
Monad.bind(Creator<From> c1,
ComponentBinder<From,To> binder)
Monadic 'bind' operation. |
|
static
|
Components.factory(Creator<T> cc,
java.lang.String toString)
Create a Component that instantiates the Factory interface. |
|
static
|
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
|
Components.factory(Creator cc,
java.lang.Class<F> factory_class,
java.lang.String toString)
Create a Component that instantiates a factory interface. |
|
static
|
Monad.followedBy(Component<T> c1,
Creator<?> c2)
Create a staged component. |
|
Component<T> |
Component.followedBy(Creator<?> c2)
Create a staged component. |
|
static
|
Components.hashmap(K[] keys,
Creator<T>[] creators)
Create a Component object that creates a java.util.LinkedHashMap object. |
|
static
|
Components.hashset(Creator<T>... ccs)
Create a Component object that creates java.util.HashSet. |
|
static
|
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. |
|
|
Container.instantiateComponent(Creator<T> cc)
Instantiate component instance. |
|
|
Container.instantiateComponent(java.lang.Object key,
Creator<T> cc)
Instantiate component instance. |
|
static
|
Components.list(Creator<T>... ccs)
Create a Component object that creates java.util.ArrayList. |
|
static
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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. |
|
static
|
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
|
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
|
Monad.onException(java.lang.Class<? extends java.lang.Throwable> type,
Creator<T> creator)
Create a Recovery object that will recover from a provided exception type by returning an alternative Creator object. |
|
static
|
Monad.recover(Creator<T> c1,
Recovery<T> r)
Create a new Component object that will recover errors happened from the provided Component. |
|
static
|
Components.repeat(Creator<T> cc,
int times)
Create a Component that repeatedly call another Component for certain amount of times. |
|
static
|
Monad.seq(Creator<A> c1,
Creator<B> c2)
Monadic 'sequence' operation. |
|
static
|
Monad.seq(Creator<A> c1,
Creator<B> c2)
Monadic 'sequence' operation. |
|
|
Component.seq(Creator<R> c2)
Monadic 'sequence' operation. |
|
static
|
Monad.sequence(Creator<T>... ccs)
Monadic 'sequence' operator that sequentially execute an array of components and keep the result of the last one. |
|
static
|
Components.storeArray(Component<T[]> component_returning_array,
Creator<T>... creators)
|
|
static
|
Components.storeList(Component<L> component_returning_list,
Creator<T>... creators)
Create a Component object that sequentially execute an array of components and collect the result into a java.util.List object. |
|
static
|
Components.storeMap(Component<M> component_return_map,
K[] keys,
Creator<T>[] vals)
Create a Component that sequentially execute an array of Component object, and collect the results in a java.util.Map object. |
|
static
|
Components.storeSet(Component<S> component_returning_set,
Creator<T>... creators)
Create a Component object that sequentially execute an array of components and collect the result into a java.util.Set object. |
|
static
|
Monad.toVerificationBinder(Creator<T> c)
Create a ComponentBinder object that uses a Creator object for instantiation and verification regardless of the input. |
|
static Component |
Components.withArgument(Component cc,
int k,
Creator factory)
Customizes the creation of one parameter of a Component object using a Creator object. |
|
Component |
Component.withArgument(int i,
Creator factory)
Create a new Component object that uses a given Creator to create one of its parameters. |
|
static Component |
Components.withArguments(Component cc,
Creator[] creators)
Customizes a Component's parameters with an array of Creator objects. |
|
Component<T> |
Component.withArguments(Creator[] factories)
Create a new Component object that uses given Creator objects to create its parameters. |
|
static
|
Components.withDefaultArgument(Component<T> cc,
int k,
Creator v)
Create a Component object that will use an alternative Creator object when a certain parameter cannot be resolved or is passed in as default. |
|
Component<T> |
Component.withDefaultArgument(int ind,
Creator def)
Create a Component object that will use an alternative Creator object when a certain parameter is passed in as default. |
|
static
|
Components.withDefaultProperty(Component<T> cc,
java.lang.Object k,
Creator v)
Create a Component object that will use an alternative Creator object when a certain property cannot be resolved or is passed in as default. |
|
Component<T> |
Component.withDefaultProperty(java.lang.Object key,
Creator def)
Create a Component object that will use an alternative Creator object when a certain property is passed in as default. |
|
static Component |
Components.withProperties(Component cc,
java.lang.String[] names,
Creator[] creators)
Customizes a Component's properties with the provided Creator objects. |
|
Component<T> |
Component.withProperties(java.lang.String[] keys,
Creator[] creators)
Create a new Component object that uses given Creator objects to create some of its properties' value. |
|
static
|
Components.withProperty(Component<T> cc,
java.lang.Object k,
Creator factory)
Customizes the creation of one property value of a Component object with a Creator object. |
|
Component<T> |
Component.withProperty(java.lang.Object k,
Creator factory)
Create a new Component object that uses a given Creator object to create one of its property value. |
|
| Constructors in jfun.yan with parameters of type Creator | |
|---|---|
Creator2Component(Creator<T> creator)
|
|
StoreBinder(Creator<T>[] steps)
Create a StoreBinder object. |
|
| Uses of Creator in jfun.yan.containers |
|---|
| Methods in jfun.yan.containers with parameters of type Creator | ||
|---|---|---|
|
SimpleContainer.instantiateComponent(Creator<T> cc)
|
|
|
DelegatingContainer.instantiateComponent(Creator<T> cc)
|
|
|
SimpleContainer.instantiateComponent(Creator<T> cc,
ComponentMap cmap)
|
|
|
SimpleContainer.instantiateComponent(java.lang.Object key,
Creator<T> cc)
|
|
|
DelegatingContainer.instantiateComponent(java.lang.Object key,
Creator<T> cc)
|
|
|
SimpleContainer.instantiateComponent(java.lang.Object key,
Creator<T> cc,
ComponentMap cmap)
|
|
| Uses of Creator in jfun.yan.etc |
|---|
| Methods in jfun.yan.etc that return Creator | |
|---|---|
Creator |
FilteredPropertyBinder.bind(java.lang.Class component_type,
java.lang.Object key,
java.lang.Class type)
|
| Constructors in jfun.yan.etc with parameters of type Creator | |
|---|---|
FilteredPropertyBinder(PropertyPredicate pred,
Creator consequence,
PropertyBinder alternative)
Create a FilteredPropertyBinder instance. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||