/** * Converts a value to a String. * * @param o The value to convert. * @return The converted value, or <jk>null</jk> if the input was null. */ public static String toStringVal(Object o) { return StringUtils.asString(o); }
/** * Converts a value to a String. * * @param o The value to convert. * @return The converted value, or <jk>null</jk> if the input was null. */ public static String toStringVal(Object o) { return StringUtils.asString(o); }
/** * Converts a value to a String. * * @param o The value to convert. * @return The converted value, or <jk>null</jk> if the input was null. */ public static String toStringVal(Object o) { return StringUtils.asString(o); }
/** * Bean property setter: <property>x-example</property>. * * @param value The property value. * @return This object (for method chaining). */ public ParameterInfo example(Object value) { example = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>x-example</property>. * * @param value The property value. * @return This object (for method chaining). */ public ParameterInfo example(Object value) { example = StringUtils.asString(value); return this; }
@Override /* Var */ public String resolve(VarResolverSession session, String varVal) { return asString(m.get(varVal)); } }
@Override /* Var */ public String resolve(VarResolverSession session, String varVal) { return asString(m.get(varVal)); } }
/** * Convenience method for setting a system property value. * * @param key The system property key. * @param value The system property value. * @param overwrite Overwrite the previous value if it exists. */ public static void setProperty(String key, Object value, boolean overwrite) { if (value != null) { if (System.getProperty(key) == null || overwrite) System.setProperty(key, StringUtils.asString(value)); } }
/** * Convenience method for setting a system property value. * * @param key The system property key. * @param value The system property value. * @param overwrite Overwrite the previous value if it exists. */ public static void setProperty(String key, Object value, boolean overwrite) { if (value != null) { if (System.getProperty(key) == null || overwrite) System.setProperty(key, StringUtils.asString(value)); } }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public SchemaInfo setRef(Object value) { ref = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public SchemaInfo setRef(Object value) { ref = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public Items setRef(Object value) { ref = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public SchemaInfo setRef(Object value) { ref = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public HeaderInfo setRef(Object value) { ref = StringUtils.asString(value); return this; }
/** * Bean property setter: <property>$ref</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ @BeanProperty("$ref") public HeaderInfo setRef(Object value) { ref = StringUtils.asString(value); return this; }
@Override /* Parameter */ public String resolve(VarResolverSession session, String key) { RestRequest req = session.getSessionObject(RestRequest.class, SESSION_req, true); return asString(req.getAttribute(key)); } }
@Override /* Parameter */ public String resolve(VarResolverSession session, String key) { RestRequest req = session.getSessionObject(RestRequest.class, SESSION_req, true); return asString(req.getAttribute(key)); } }
private String resolve(Object uri, UriResolution res) { String s = asString(uri); if (isAbsoluteUri(s)) return hasDotSegments(s) && res != NONE ? normalize(s) : s; if (res == ROOT_RELATIVE && startsWith(s, '/')) return hasDotSegments(s) ? normalize(s) : s; if (res == NONE && ! isSpecialUri(s)) return s; return append(new StringBuilder(), s).toString(); }
private String resolve(Object uri, UriResolution res) { String s = asString(uri); if (isAbsoluteUri(s)) return hasDotSegments(s) && res != NONE ? normalize(s) : s; if (res == ROOT_RELATIVE && startsWith(s, '/')) return hasDotSegments(s) ? normalize(s) : s; if (res == NONE && ! isSpecialUri(s)) return s; return append(new StringBuilder(), s).toString(); }
private String resolve(Object uri, UriResolution res) { String s = asString(uri); if (isAbsoluteUri(s)) return hasDotSegments(s) && res != NONE ? normalize(s) : s; if (res == ROOT_RELATIVE && startsWith(s, '/')) return hasDotSegments(s) ? normalize(s) : s; if (res == NONE && ! isSpecialUri(s)) return s; return append(new StringBuilder(), s).toString(); }