public void extractCondition(String condition, Statement statement) throws MatParseException {
        List<String> defines = conditionParser.extractDefines(condition);
        for (String string : defines) {
            MatParam param = findMatParam(string);
            if (param != null) {
                addDefine(param.getName(), param.getVarType());
            } else {
                throw new MatParseException("Invalid condition, condition must match a Material Parameter named " + condition, statement);
            }
        }
    }
Extracts and checks a condition expression.

@param condition the condition expression.
@param statement the statement being read.
@throws MatParseException if the condition isn't valid.
jme3-core/src/plugins/java/com/jme3/material/plugins/ShaderNodeLoaderDelegate.java