public class BeanDefinition<T>
extends java.lang.Object
null
).
To initialize cache, get the bean instance from container.Modifier and Type | Field and Description |
---|---|
protected java.util.function.Consumer<T> |
consumer |
protected CtorInjectionPoint |
ctor |
protected DestroyMethodPoint[] |
destroyMethods |
protected InitMethodPoint[] |
initMethods |
protected MethodInjectionPoint[] |
methods |
protected java.lang.String |
name |
protected java.lang.String[] |
params |
protected PropertyInjectionPoint[] |
properties |
protected Scope |
scope |
protected SetInjectionPoint[] |
sets |
protected java.lang.Class<T> |
type |
protected ValueInjectionPoint[] |
values |
protected WiringMode |
wiringMode |
Constructor and Description |
---|
BeanDefinition(java.lang.String name,
java.lang.Class<T> type,
Scope scope,
WiringMode wiringMode,
java.util.function.Consumer<T> beanInitConsumer) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDestroyMethodPoints(DestroyMethodPoint[] methods)
Adds destroy methods.
|
protected void |
addInitMethodPoints(InitMethodPoint[] methods)
Adds init methods.
|
protected void |
addMethodInjectionPoint(MethodInjectionPoint mip)
Adds method injection point.
|
protected void |
addPropertyInjectionPoint(PropertyInjectionPoint pip)
Adds property injection point.
|
protected void |
addSetInjectionPoint(SetInjectionPoint sip)
Adds set injection point.
|
java.util.function.Consumer<T> |
consumer()
Returns an optional consumer.
|
CtorInjectionPoint |
ctorInjectionPoint()
Returns constructor injection point.
|
DestroyMethodPoint[] |
destroyMethodPoints()
Returns destroy method points.
|
InitMethodPoint[] |
initMethodPoints()
Returns init method points.
|
MethodInjectionPoint[] |
methodInjectionPoints()
Returns method injection points.
|
java.lang.String |
name()
Returns bean name.
|
java.lang.String[] |
params()
Returns parameters.
|
PropertyInjectionPoint[] |
propertyInjectionPoints()
Returns property injection points.
|
java.lang.Class<? extends Scope> |
scope()
Returns beans scope type.
|
protected java.lang.Object |
scopeLookup()
Delegates to
Scope.lookup(String) . |
protected void |
scopeRegister(java.lang.Object object)
Delegates to
Scope.register(jodd.petite.BeanDefinition, Object)
if scope is defined. |
protected void |
scopeRemove()
Delegates to
Scope.remove(String) . |
SetInjectionPoint[] |
setterInjectionPoints()
Returns set injection points.
|
java.lang.String |
toString() |
java.lang.Class<T> |
type()
Returns bean type.
|
WiringMode |
wiringMode()
Returns wiring mode.
|
protected final java.lang.String name
protected final java.lang.Class<T> type
protected final Scope scope
protected final WiringMode wiringMode
protected final java.util.function.Consumer<T> consumer
protected CtorInjectionPoint ctor
protected PropertyInjectionPoint[] properties
protected SetInjectionPoint[] sets
protected MethodInjectionPoint[] methods
protected InitMethodPoint[] initMethods
protected DestroyMethodPoint[] destroyMethods
protected java.lang.String[] params
protected ValueInjectionPoint[] values
public BeanDefinition(java.lang.String name, java.lang.Class<T> type, Scope scope, WiringMode wiringMode, java.util.function.Consumer<T> beanInitConsumer)
public java.lang.String name()
public java.lang.Class<T> type()
public java.lang.Class<? extends Scope> scope()
public WiringMode wiringMode()
public java.util.function.Consumer<T> consumer()
public CtorInjectionPoint ctorInjectionPoint()
public PropertyInjectionPoint[] propertyInjectionPoints()
public SetInjectionPoint[] setterInjectionPoints()
public MethodInjectionPoint[] methodInjectionPoints()
public InitMethodPoint[] initMethodPoints()
public DestroyMethodPoint[] destroyMethodPoints()
public java.lang.String[] params()
protected java.lang.Object scopeLookup()
Scope.lookup(String)
.protected void scopeRegister(java.lang.Object object)
Scope.register(jodd.petite.BeanDefinition, Object)
if scope is defined.protected void scopeRemove()
Scope.remove(String)
.protected void addPropertyInjectionPoint(PropertyInjectionPoint pip)
protected void addSetInjectionPoint(SetInjectionPoint sip)
protected void addMethodInjectionPoint(MethodInjectionPoint mip)
protected void addInitMethodPoints(InitMethodPoint[] methods)
protected void addDestroyMethodPoints(DestroyMethodPoint[] methods)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-present Jodd Team