|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.iocular.def.ComponentBuilder
public class ComponentBuilder
Thingy which helps with building a component definition. This contains all definition-time data related to a single component object.
Method Summary | |
---|---|
ComponentBuilder |
destroy(java.lang.Class<?> wh,
java.lang.String methodName)
Define a "close" or "discard" method on another class for a given object. |
ComponentBuilder |
destroy(java.lang.String methodName)
Define a "close" or "discard" method on the instance that was created. |
ComponentBuilder |
factory(java.lang.Class<?> clz,
java.lang.String method)
A basic object builder defining an object to be returned from a static factory method on a class. |
ComponentBuilder |
factory(java.lang.String id,
java.lang.String method)
A basic object builder defining an object to be returned from a container object identified by a name, by calling a method on that object. |
ComponentBuilder |
factoryStart(java.lang.Class<?> clz,
java.lang.String methodName,
java.lang.Class<?>... arguments)
Only used for static factories, this allows you to call a static method on whatever static class to get it to initialize. |
ComponentBuilder |
factoryStart(java.lang.String methodName,
java.lang.Class<?>... arguments)
Only used for static factories, this allows you to call a static method on the container class itself to get it to initialize. |
BasicContainerBuilder |
getBuilder()
|
java.lang.String |
getDefinitionLocation()
|
java.lang.String |
getIdent()
|
BindingScope |
getScope()
|
ComponentBuilder |
implement(java.lang.Class<?> clz)
Define an explicit type for this class. |
ComponentBuilder |
name(java.lang.String name)
When called this adds a name for the component. |
ComponentBuilder |
parameter(java.lang.Class<?> ptype)
Create the specified class by getting a parameter that is set, in runtime, when the container is constructed. |
ComponentBuilder |
scope(BindingScope scope)
Defines the scope for this object. |
ComponentBuilder |
setAllProperties()
This defines that all properties on the instance must be set; it aborts if it cannot find a proper instance for a given property. |
ComponentBuilder |
setKnownProperties()
This sets all properties on this components for which a value can be determined. |
ComponentBuilder |
setProperties(java.lang.String... names)
Define a set of properties on this component that must be set using default wiring for the properties. |
ComponentBuilder |
setProperty(java.lang.String name,
java.lang.Class<?> componentClass)
Inject the specified property with the component registered with the specified class. |
ComponentBuilder |
setProperty(java.lang.String name,
java.lang.String componentId)
Inject the specified property with the component with the given name. |
ComponentBuilder |
start(java.lang.String methodName,
java.lang.Class<?>... arguments)
Add a start method to an object being retrieved. |
java.lang.String |
toString()
|
ComponentBuilder |
type(java.lang.Class<?> clz)
Create the specified class using it's constructor, followed by setter injection where needed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getDefinitionLocation()
public BasicContainerBuilder getBuilder()
public ComponentBuilder type(java.lang.Class<?> clz)
public ComponentBuilder parameter(java.lang.Class<?> ptype)
ptype
-
public ComponentBuilder factory(java.lang.Class<?> clz, java.lang.String method)
A basic object builder defining an object to be returned from a static factory method on a class. The method passed must be resolvable to a static method on the class passed, and it's parameters must be fillable from the container. After this call we'll have a "method" current so the calls to set method parameters work and will define parameters for this method.
This method defines creation so it throws up if another creation method is already defined.
clz
- method
-
public ComponentBuilder factory(java.lang.String id, java.lang.String method)
id
- method
-
public ComponentBuilder name(java.lang.String name)
name
- public ComponentBuilder scope(BindingScope scope)
scope
-
public ComponentBuilder destroy(java.lang.Class<?> wh, java.lang.String methodName)
wh
- what
-
public ComponentBuilder destroy(java.lang.String methodName)
methodName
-
public ComponentBuilder implement(java.lang.Class<?> clz)
clz
-
public ComponentBuilder factoryStart(java.lang.String methodName, java.lang.Class<?>... arguments)
methodName
- arguments
-
public ComponentBuilder factoryStart(java.lang.Class<?> clz, java.lang.String methodName, java.lang.Class<?>... arguments)
methodName
- arguments
-
public ComponentBuilder start(java.lang.String methodName, java.lang.Class<?>... arguments)
methodName
- arguments
-
public ComponentBuilder setAllProperties()
public ComponentBuilder setKnownProperties()
public ComponentBuilder setProperties(java.lang.String... names)
names
-
public ComponentBuilder setProperty(java.lang.String name, java.lang.String componentId)
name
- componentId
-
public ComponentBuilder setProperty(java.lang.String name, java.lang.Class<?> componentClass)
name
- componentClass
-
public java.lang.String getIdent()
public java.lang.String toString()
toString
in class java.lang.Object
public BindingScope getScope()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |