Package org.apache.qpid.jms.util
Class VariableExpansion
- java.lang.Object
-
- org.apache.qpid.jms.util.VariableExpansion
-
public final class VariableExpansion extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVariableExpansion.MapResolverstatic interfaceVariableExpansion.Resolverstatic classVariableExpansion.UnresolvedVariableException
-
Field Summary
Fields Modifier and Type Field Description static VariableExpansion.ResolverENV_VAR_RESOLVERstatic VariableExpansion.ResolverSYS_PROP_RESOLVER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringexpand(String input, VariableExpansion.Resolver resolver)Expands any variables found in the given input string.
-
-
-
Field Detail
-
ENV_VAR_RESOLVER
public static final VariableExpansion.Resolver ENV_VAR_RESOLVER
-
SYS_PROP_RESOLVER
public static final VariableExpansion.Resolver SYS_PROP_RESOLVER
-
-
Method Detail
-
expand
public static final String expand(String input, VariableExpansion.Resolver resolver) throws VariableExpansion.UnresolvedVariableException, IllegalArgumentException, NullPointerException
Expands any variables found in the given input string.- Parameters:
input- the string to expand any variables inresolver- the resolver to use- Returns:
- the expanded output
- Throws:
VariableExpansion.UnresolvedVariableException- If a variable without a default can't be expanded because it (or indirectly its value) is not resolvable.IllegalArgumentException- if an argument can't be expanded due to other issue with the input.NullPointerException- if a resolver is not supplied
-
-