static String getOrResolveAddress(AliasRegistry registry, String addressString) {
        if (!isValidExpression(addressString)) {
            throw new IllegalArgumentException("Invalid Syntax, either use tag address (no starting $) " +
                "or an alias with Syntax ${xxx}. But given was '" + addressString + "'");
        }
        if (!isAlias(addressString)) {
            return addressString;
        }
        String alias = getAlias(addressString);
        if (registry.canResolve(alias)) {
            return registry.resolve(alias);
        } else {
            throw new IllegalArgumentException("Unable to resolve Alias '" + alias + "' in Schema Registry");
        }

    }
Utility methods for usage with OPM.
plc4j/tools/opm/src/main/java/org/apache/plc4x/java/opm/OpmUtils.java