jodd.petite
Class PetiteConfig

java.lang.Object
  extended by jodd.petite.PetiteConfig

public class PetiteConfig
extends Object

Petite configuration.


Field Summary
protected  Class<? extends Scope> defaultScope
           
protected  WiringMode defaultWiringMode
           
protected  boolean detectDuplicatedBeanNames
           
protected  boolean detectMixedScopes
           
protected  PetiteReference[] lookupReferences
           
protected  boolean resolveReferenceParameters
           
protected  boolean useFullTypeNames
           
protected  boolean useParamo
           
protected  boolean wireScopedProxy
           
 
Constructor Summary
PetiteConfig()
           
 
Method Summary
 Class<? extends Scope> getDefaultScope()
          Returns default scope type.
 WiringMode getDefaultWiringMode()
          Returns default wiring mode.
 boolean getDetectDuplicatedBeanNames()
          Returns true if container detects duplicated bean names.
 PetiteReference[] getLookupReferences()
           
 boolean getResolveReferenceParameters()
          Returns true if parameter references should be resolved.
 boolean getUseFullTypeNames()
           
 boolean getUseParamo()
           
 boolean isDetectMixedScopes()
           
 boolean isWireScopedProxy()
           
protected  WiringMode resolveWiringMode(WiringMode wiringMode)
          Resolves wiring mode by checking if default and null values.
 void setDefaultScope(Class<? extends Scope> defaultScope)
          Sets default scope type.
 void setDefaultWiringMode(WiringMode defaultWiringMode)
          Specifies default wiring mode.
 void setDetectDuplicatedBeanNames(boolean detectDuplicatedBeanNames)
          Specifies if an exception should be thrown if two beans with same exception are registered with this container.
 void setDetectMixedScopes(boolean detectMixedScopes)
          Defines if mixed scopes should be detected as errors.
 void setLookupReferences(PetiteReference... lookupReferences)
          Specifies references for bean name lookup, when name is not specified, in given order.
 void setResolveReferenceParameters(boolean resolveReferenceParameters)
          Defines if reference parameters should be resolved.
 void setUseFullTypeNames(boolean useFullTypeNames)
          Specifies if type names should be full or short.
 void setUseParamo(boolean useParamo)
          Specifies if Paramo tool should be used to resolve method and ctor argument names.
 void setWireScopedProxy(boolean wireScopedProxy)
          Defines if scoped proxies should be wired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultScope

protected Class<? extends Scope> defaultScope

defaultWiringMode

protected WiringMode defaultWiringMode

detectDuplicatedBeanNames

protected boolean detectDuplicatedBeanNames

resolveReferenceParameters

protected boolean resolveReferenceParameters

useFullTypeNames

protected boolean useFullTypeNames

lookupReferences

protected PetiteReference[] lookupReferences

useParamo

protected boolean useParamo

wireScopedProxy

protected boolean wireScopedProxy

detectMixedScopes

protected boolean detectMixedScopes
Constructor Detail

PetiteConfig

public PetiteConfig()
Method Detail

getDefaultScope

public Class<? extends Scope> getDefaultScope()
Returns default scope type.


setDefaultScope

public void setDefaultScope(Class<? extends Scope> defaultScope)
Sets default scope type.


getDefaultWiringMode

public WiringMode getDefaultWiringMode()
Returns default wiring mode.


setDefaultWiringMode

public void setDefaultWiringMode(WiringMode defaultWiringMode)
Specifies default wiring mode.


resolveWiringMode

protected WiringMode resolveWiringMode(WiringMode wiringMode)
Resolves wiring mode by checking if default and null values.


getDetectDuplicatedBeanNames

public boolean getDetectDuplicatedBeanNames()
Returns true if container detects duplicated bean names.


setDetectDuplicatedBeanNames

public void setDetectDuplicatedBeanNames(boolean detectDuplicatedBeanNames)
Specifies if an exception should be thrown if two beans with same exception are registered with this container.


getResolveReferenceParameters

public boolean getResolveReferenceParameters()
Returns true if parameter references should be resolved.


setResolveReferenceParameters

public void setResolveReferenceParameters(boolean resolveReferenceParameters)
Defines if reference parameters should be resolved.


getUseFullTypeNames

public boolean getUseFullTypeNames()

setUseFullTypeNames

public void setUseFullTypeNames(boolean useFullTypeNames)
Specifies if type names should be full or short.


getLookupReferences

public PetiteReference[] getLookupReferences()

setLookupReferences

public void setLookupReferences(PetiteReference... lookupReferences)
Specifies references for bean name lookup, when name is not specified, in given order.


getUseParamo

public boolean getUseParamo()

setUseParamo

public void setUseParamo(boolean useParamo)
Specifies if Paramo tool should be used to resolve method and ctor argument names. If Paramo is not available, this property can't be set (i.e. will be always false).


isWireScopedProxy

public boolean isWireScopedProxy()

setWireScopedProxy

public void setWireScopedProxy(boolean wireScopedProxy)
Defines if scoped proxies should be wired. Only available with Proxetta.


isDetectMixedScopes

public boolean isDetectMixedScopes()

setDetectMixedScopes

public void setDetectMixedScopes(boolean detectMixedScopes)
Defines if mixed scopes should be detected as errors. If wireScopedProxy is not set, then enabling this flag will throw an exception on mixed scopes. If wireScopedProxy is set enabling this flag will just issue a warn message in the log. Only available with Proxetta.