org.jboss.metadata.property
Class JBossASSimpleExpressionResolver
java.lang.Object
org.jboss.metadata.property.JBossASSimpleExpressionResolver
- All Implemented Interfaces:
- PropertyResolver, SimpleExpressionResolver
- Direct Known Subclasses:
- PropertiesPropertyResolver, SystemPropertyResolver
public abstract class JBossASSimpleExpressionResolver
- extends Object
- implements SimpleExpressionResolver, PropertyResolver
Base class for SimpleExpressionResolver implementations that
handle traditional JBoss AS style expressions, with syntax key[,key]*[:defaultValue].
This class handles:
- any
defaultValue if all key values are unresolvable
- separation of multiple comma-delimited
key values
- the special cases where
key is the string "/" or ":", returning
File.separator and File.pathSeparator, respectively.
- Author:
- Brian Stansberry (c) 2014 Red Hat Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JBossASSimpleExpressionResolver
public JBossASSimpleExpressionResolver()
resolve
@Deprecated
public String resolve(String propertyName)
- Deprecated. use
SimpleExpressionResolver and resolveExpressionContent(String)
- Treats
propertyName as expression key and passes it to resolveExpressionKey(String).
This method is retained for compatibility with legacy PropertyResolver usage.
- Specified by:
resolve in interface PropertyResolver
- Parameters:
propertyName - the expression
The name to resolve.
- Returns:
- The resolved value or
null if the property can not be resolved.
resolveExpressionContent
public SimpleExpressionResolver.ResolutionResult resolveExpressionContent(String expressionContent)
- Parses the given expression, extracting any key if present and returning the resolved
value, if available, or, if not, returning any default value that is present. See the class javadoc
for full details.
- Specified by:
resolveExpressionContent in interface SimpleExpressionResolver
- Parameters:
expressionContent - the expression
- Returns:
- the resolved value, or null if the value cannot be resolved
resolveKey
protected abstract String resolveKey(String key)
- Resolve a value with the given key.
- Parameters:
key - the key. Will not be null
- Returns:
- the resolved value, or
null if no value corresponds to key
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.