public String toString() { return Strings.defaultToString(o); }
/** * Convert and join an array of objects into one string. * * @param array Array of objects to join as strings. * @return Converted and joined objects. */ public static String join(final Object array[]) { return join(array, null); }
/** * Return a string padded with the given string for the given count. * * @param string Pad element. * @param count Pad count. * @return Padded string. */ public static String pad(final String string, final int count) { return pad(new StringBuffer(), string, count); }
if (Strings.isJavaKeyword(paramName)) throw new DeploymentException( "Usage parameter concrete class is a Java keyword!"); if (!Strings.isValidJavaIdentifier(paramName)) throw new DeploymentException( "Usage parameter concrete class generator, invalid Java identifier!");
/** * Make a URL from the given string. * * @see #toURL(String,String) * * @param urlspec The string to construct a URL for. * @return A URL for the given string. * * @throws MalformedURLException Could not make a URL for the given string. */ public static URL toURL(final String urlspec) throws MalformedURLException { return toURL(urlspec, null); }
if (name == null || name.trim().length() == 0) throw new DeploymentException("activation-config-property doesn't have a name"); if (Strings.isValidJavaIdentifier(name) == false) throw new DeploymentException("activation-config-property '" + name + "' is not a valid java identifier"); md.setName(name);
/** * Returns a URL for the input object converted to a string. * * @return a URL object * * @throws NestedRuntimeException An MalformedURLException occured. */ public Object getValue() { try { return Strings.toURL(getAsText()); } catch (MalformedURLException e) { throw new NestedRuntimeException(e); } } }
public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(Strings.defaultToString(this)).append('('); buffer.append("spec=").append(Strings.defaultToString(spec)); buffer.append(" mepf=").append(Strings.defaultToString(endpointFactory)); buffer.append(" active=").append(deliveryActive.get()); if (destination != null) buffer.append(" destination=").append(destination); if (connection != null) buffer.append(" connection=").append(connection); if (pool != null) buffer.append(" pool=").append(Strings.defaultToString(pool)); if (dlqHandler != null) buffer.append(" dlq=").append(Strings.defaultToString(dlqHandler)); buffer.append(" transacted=").append(isDeliveryTransacted); buffer.append(')'); return buffer.toString(); }
/** * Join an array of strings into one delimited string. * * @param array Array of objects to join as strings. * @param delim Delimiter to join strings with or <i>null</i>. * @return Joined string. */ public static String join(final Object array[], final String delim) { return join(new StringBuffer(), array, delim); }
try target = Strings.toURL(ourPath);
/** * Return a string padded with the given string value of an object * for the given count. * * @param obj Object to convert to a string. * @param count Pad count. * @return Padded string. */ public static String pad(final Object obj, final int count) { return pad(new StringBuffer(), String.valueOf(obj), count); }
/** * Invoke on a method * * @param method the method * @param target the target * @param arguments the arguments * @return the result of the invocation * @throws Throwable for any error */ public static Object invoke(Method method, Object target, Object[] arguments) throws Throwable { if (method == null) throw new IllegalArgumentException("Null method"); try { return method.invoke(target, arguments); } catch (Throwable t) { throw handleErrors(method.getName(), Strings.defaultToString(target), method.getParameterTypes(), arguments, t); } }
/** * Return a string representation of this object. * * @return A string representation of this object. */ public String toString() { return super.toString() + Strings.join(elements, "[", ",", "]"); }
target = Strings.toURL(ourPath);
out.print(Strings.pad(" ", maxNameLength - name.length())); out.print(" ");
throw handleErrors(method.getName(), Strings.defaultToString(target), method.getParameterTypes(), arguments, t);
/** * Convert and join an array of bytes into one string. * * @param array Array of objects to join as strings. * @return Converted and joined objects. */ public static String join(final byte array[]) { Byte bytes[] = new Byte[array.length]; for (int i = 0; i < bytes.length; i++) { bytes[i] = new Byte(array[i]); } return join(bytes, null); }
log.trace("new stack for key: " + Strings.defaultToString(rawKey)); stack = new LinkedList(); currentObjects.set(stack); log.trace("old stack for key: " + Strings.defaultToString(rawKey));
/** * Return a string composed of the given array. * * @param array Array of objects. * @param prefix String prefix. * @param separator Element sepearator. * @param suffix String suffix. * @return String in the format of: * prefix + n ( + separator + n+i)* + suffix. */ public static String join(final Object[] array, final String prefix, final String separator, final String suffix) { return join(new StringBuffer(), array, prefix, separator, suffix); }
public String toString() buffer.append(Strings.defaultToString(this)).append('('); buffer.append("ra=").append(ra); buffer.append(" destination=").append(destination);