static boolean isClearVariablesOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.CLEAR_VARAIBLES.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
/** * Returns a fully qualified attribute name that corresponds to a given * enumerated type identifier. * * @param fqan fully qualified attribute name * @return a matched enumerated type identifier */ public static AttributeName getType(String fqpn) { AttributeName[] names = AttributeName.values(); for (int i=0; i<names.length; i++) { if (fqpn.equals(names[i].toString())) { return names[i]; } } return null; } }
static boolean isTerminationOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.TERMINATION.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
/** * Returns a fully qualified attribute name that corresponds to a given * enumerated type identifier. * * @param fqan fully qualified attribute name * @return a matched enumerated type identifier */ public static AttributeName getType(String fqpn) { AttributeName[] names = AttributeName.values(); for (int i=0; i<names.length; i++) { if (fqpn.equals(names[i].toString())) { return names[i]; } } return null; } }
/** * Gets a receiver object from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return receiver object or null if the attribute doesn't exist */ static Object getReceiver(ScriptContext context) { return context.getAttribute(AttributeName.RECEIVER.toString(), ScriptContext.ENGINE_SCOPE); }
/** * Returns a fully qualified attribute name that corresponds to a given * enumerated type identifier. * * @param fqan fully qualified attribute name * @return a matched enumerated type identifier */ public static AttributeName getType(String fqpn) { AttributeName[] names = AttributeName.values(); for (int i=0; i<names.length; i++) { if (fqpn.equals(names[i].toString())) { return names[i]; } } return null; } }
static boolean isTerminationOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.TERMINATION.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
/** * Returns a fully qualified attribute name that corresponds to a given * enumerated type identifier. * * @param fqan fully qualified attribute name * @return a matched enumerated type identifier */ public static AttributeName getType(String fqpn) { AttributeName[] names = AttributeName.values(); for (int i=0; i<names.length; i++) { if (fqpn.equals(names[i].toString())) { return names[i]; } } return null; } }
static boolean isTerminationOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.TERMINATION.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
/** * Gets a receiver object from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return receiver object or null if the attribute doesn't exist */ static Object getReceiver(ScriptContext context) { return context.getAttribute(AttributeName.RECEIVER.toString(), ScriptContext.ENGINE_SCOPE); }
/** * Gets line number value from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return line number */ static int getLineNumber(ScriptContext context) { Object obj = context.getAttribute(AttributeName.LINENUMBER.toString(), ScriptContext.ENGINE_SCOPE); if (obj instanceof Integer) { return (Integer) obj; } return 0; }
/** * Gets a receiver object from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return receiver object or null if the attribute doesn't exist */ static Object getReceiver(ScriptContext context) { return context.getAttribute(AttributeName.RECEIVER.toString(), ScriptContext.ENGINE_SCOPE); }
/** * Gets a receiver object from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return receiver object or null if the attribute doesn't exist */ static Object getReceiver(ScriptContext context) { return context.getAttribute(AttributeName.RECEIVER.toString(), ScriptContext.ENGINE_SCOPE); }
static boolean isTerminationOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.TERMINATION.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
static boolean isClearVariablesOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.CLEAR_VARAIBLES.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
static boolean isClearVariablesOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.CLEAR_VARAIBLES.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
static boolean isClearVariablesOn(ScriptContext context) { Object obj = context.getAttribute(AttributeName.CLEAR_VARAIBLES.toString()); if (obj != null && obj instanceof Boolean && ((Boolean) obj) == true) { return true; } return false; }
private static Object getReceiverObject(ScriptContext context) { if (context == null) return null; return context.getAttribute(AttributeName.RECEIVER.toString(), ScriptContext.ENGINE_SCOPE); }
/** * Gets line number value from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return line number */ static int getLineNumber(ScriptContext context) { Object obj = context.getAttribute(AttributeName.LINENUMBER.toString(), ScriptContext.ENGINE_SCOPE); if (obj instanceof Integer) { return (Integer)obj; } return 0; }
/** * Gets line number value from engine's attribute map. * * @param context ScriptContext to be used to the evaluation * @return line number */ static int getLineNumber(ScriptContext context) { Object obj = context.getAttribute(AttributeName.LINENUMBER.toString(), ScriptContext.ENGINE_SCOPE); if (obj instanceof Integer) { return (Integer)obj; } return 0; }