try ss = SearchScope.definedValueOf(getNamedValueAsInteger("scope"));
/** * Creates an argument for a search scope value. * * @param s The search scope value for the argument. It may be * {@code null}. * @param comment A comment that may help clarify the argument. It may * be {@code null} if there should be no comment. * * @return The argument that was created. */ public static ToCodeArgHelper createScope(final SearchScope s, final String comment) { if (s == null) { return new ToCodeArgHelper("(SearchScope) null", comment); } final SearchScope definedScope = SearchScope.definedValueOf(s.intValue()); if (definedScope == null) { return new ToCodeArgHelper("SearchScope.valueOf(" + s.intValue() + ')', comment); } else { return new ToCodeArgHelper("SearchScope." + definedScope.getName(), comment); } }
/** * Creates an argument for a search scope value. * * @param s The search scope value for the argument. It may be * {@code null}. * @param comment A comment that may help clarify the argument. It may * be {@code null} if there should be no comment. * * @return The argument that was created. */ public static ToCodeArgHelper createScope(final SearchScope s, final String comment) { if (s == null) { return new ToCodeArgHelper("(SearchScope) null", comment); } final SearchScope definedScope = SearchScope.definedValueOf(s.intValue()); if (definedScope == null) { return new ToCodeArgHelper("SearchScope.valueOf(" + s.intValue() + ')', comment); } else { return new ToCodeArgHelper("SearchScope." + definedScope.getName(), comment); } }
final int scopeValue = idElement.decodeAsEnumerated().intValue(); tmpScope = SearchScope.definedValueOf(scopeValue); if (tmpScope == null)
final int scopeValue = idElement.decodeAsEnumerated().intValue(); tmpScope = SearchScope.definedValueOf(scopeValue); if (tmpScope == null)