/** * Returns the method associated to a given method name. If an existing * constant exists then it is returned, otherwise a new instance is created. * * @param name * The method name. * @return The associated method. */ public static Method valueOf(final String name) { Method result = null; if ((name != null) && !name.equals("")) { result = Method._methods.get(name.toLowerCase()); if (result == null) { result = new Method(name); } } return result; }
/** * Returns the method associated to a given method name. If an existing * constant exists then it is returned, otherwise a new instance is created. * * @param name * The method name. * @return The associated method. */ public static Method valueOf(final String name) { Method result = null; if ((name != null) && !name.equals("")) { result = Method._methods.get(name.toLowerCase()); if (result == null) { result = new Method(name); } } return result; }
result = UNLOCK; } else { result = new Method(name);