Skip to content

Commit 77047e7

Browse files
committed
add static resolve method
1 parent 3ee9d30 commit 77047e7

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

jpos/src/main/java/org/jpos/core/Environment.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,20 @@ public static String get (String p) {
160160
return getEnvironment().getProperty(p, p);
161161
}
162162

163+
/**
164+
* Resolves the given expression using the current {@link Environment}
165+
* instance, applying the standard priority resolution rules.
166+
*
167+
* @param p the expression or literal value to resolve; may contain
168+
* placeholders using the {@code ${...}} syntax
169+
* @return the resolved value after applying environment priority rules.
170+
*
171+
* @see Environment#resolveWithPriority(String)
172+
* @see #getEnvironment()
173+
*/
174+
public static String resolve (String p) {
175+
return getEnvironment().resolveWithPriority(p);
176+
}
163177
/**
164178
* Resolves a property expression using the singleton Environment.
165179
* If the property cannot be resolved, returns the specified default.

0 commit comments

Comments
 (0)