Package org.apache.shiro.config.ogdl
Class ReflectionBuilder
java.lang.Object
org.apache.shiro.config.ogdl.ReflectionBuilder
Object builder that uses reflection and Apache Commons BeanUtils to build objects given a
map of "property values". Typically these come from the Shiro INI configuration and are used
to construct or modify the SecurityManager, its dependencies, and web-based security filters.
Recognizes
Factory implementations and will call
getInstance to satisfy any reference to this bean.- Since:
- 0.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyGlobalProperty(Map objects, String property, String value) protected voidapplyProperty(Object object, String propertyPath, Object value) protected voidapplyProperty(Object object, String propertyName, String stringValue) protected voidapplyProperty(String key, String value, Map objects) protected voidapplySingleProperty(Map objects, String name, String property, String value) buildObjects(Map<String, String> kvPairs) protected StringcheckForNullOrEmptyLiteral(String stringValue) protected voidvoiddestroy()protected org.apache.shiro.event.EventBusfindEventBus(Map<String, ?> objects) <T> Tprotected Stringprotected Objectprotected booleanisIndexedPropertyAssignment(String propertyPath) protected booleanisReference(String value) protected booleanisTypedProperty(Object object, String propertyName, Class clazz) protected ObjectresolveReference(String reference) protected ObjectresolveValue(String stringValue) voidsetAlternateObjectSupplier(Function<String, ?> alternateObjectSupplier) Plug in another way to get objects into configuration, ex: CDIvoidsetInterpolator(Interpolator interpolator) Sets theInterpolatorused when evaluating the right side of the expressions.voidsetObjects(Map<String, ?> objects) protected byte[]protected Collection<?>toCollection(String sValue) protected List<?>protected Map<?,?> protected Set<?>protected StringunescapeIfNecessary(String value)
-
Constructor Details
-
ReflectionBuilder
public ReflectionBuilder() -
ReflectionBuilder
-
-
Method Details
-
getObjects
-
setObjects
- Parameters:
objects-
-
setAlternateObjectSupplier
Plug in another way to get objects into configuration, ex: CDI- Parameters:
alternateObjectSupplier- not null (empty lambda ok)- Since:
- 2.0
-
findEventBus
-
getBean
-
getBean
-
buildObjects
-
destroy
public void destroy() -
createNewInstance
-
applyProperty
-
applyGlobalProperty
-
applySingleProperty
-
isReference
-
getId
-
getReferencedObject
-
unescapeIfNecessary
-
resolveReference
-
isTypedProperty
-
toSet
-
toMap
-
toCollection
-
toList
-
toBytes
-
resolveValue
-
checkForNullOrEmptyLiteral
-
applyProperty
-
isIndexedPropertyAssignment
-
applyProperty
-
setInterpolator
Sets theInterpolatorused when evaluating the right side of the expressions.- Since:
- 1.4
-