Example usage for java.util Arrays deepToString

List of usage examples for java.util Arrays deepToString

Introduction

In this page you can find the example usage for java.util Arrays deepToString.

Prototype

public static String deepToString(Object[] a) 

Source Link

Document

Returns a string representation of the "deep contents" of the specified array.

Usage

From source file:org.opendds.jms.common.util.Logger.java

public void info(String message, String[] args) {
    if (isInfoEnabled()) {
        info(message, Arrays.deepToString(args));
    }
}

From source file:org.dspace.content.authority.DCInputAuthority.java

private static synchronized void initPluginNames() {
    if (pluginNames == null) {
        try {//from w  w w  . j av  a  2s . c om
            if (dci == null) {
                dci = new DCInputsReader();
            }
        } catch (DCInputsReaderException e) {
            log.error("Failed reading DCInputs initialization: ", e);
        }
        List<String> names = new ArrayList<String>();
        Iterator pi = dci.getPairsNameIterator();
        while (pi.hasNext()) {
            names.add((String) pi.next());
        }

        pluginNames = names.toArray(new String[names.size()]);
        log.debug("Got plugin names = " + Arrays.deepToString(pluginNames));
    }
}

From source file:org.apache.falcon.regression.core.util.MathUtil.java

public static Object[][] append(Object[][] arr1, Object[][] arr2) {
    Assert.assertFalse(ArrayUtils.isEmpty(arr1), "arr1 can't be empty:" + Arrays.deepToString(arr1));
    Assert.assertFalse(ArrayUtils.isEmpty(arr2), "arr2 can't be empty:" + Arrays.deepToString(arr2));
    Assert.assertEquals(arr1[0].length, arr2[0].length,
            "Array rows are not compatible. " + "row of first array: " + Arrays.deepToString(arr1[0])
                    + "row of second array: " + Arrays.deepToString(arr2[0]));
    return (Object[][]) ArrayUtils.addAll(arr1, arr2);
}

From source file:de.kopis.glacier.parsers.GlacierUploaderOptionParserTest.java

@Test
public void acceptsShortcutForVaultOption() {
    final OptionSet optionSet = optionsParser
            .parse(new String[] { "-v", "vaultname", "--endpoint", "file:///endpointurl" });
    assertTrue("Option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
            optionSet.has("vault"));
    assertEquals("Value of option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
            "vaultname", optionSet.valueOf("vault"));
}

From source file:com.github.tell.mathematics.combinatorics.CombinationTest.java

@Test
public void toyExample() throws Exception {
    final Integer[] a = new Integer[] { 0, 1, 2, 3, 4 };
    final Integer[] b = ArrayUtils.subarray(a, 2, 4);
    System.out.printf("b = %s%n", Arrays.deepToString(b));
    final Integer[] c = ArrayUtils.add(b, 5);
    System.out.printf("c = %s%n", Arrays.deepToString(c));
    final Integer[] d = ArrayUtils.addAll(c, new Integer[] { 6, 7 });
    System.out.printf("d = %s%n", Arrays.deepToString(d));

    for (int i = 0; i <= d.length; i++) {
        final Combination<Integer> comb = new Combination<Integer>(d, i);
        final Integer[][] e = comb.makeCombination();
        System.out.printf("e = %s%n", Arrays.deepToString(e));
    }/*  w  ww  . j  a  va  2  s  .co  m*/
}

From source file:org.eclipse.virgo.ide.runtime.internal.core.command.AbstractJmxServerDeployerCommand.java

/**
 * {@inheritDoc}//from ww  w.  jav  a2 s  .  c o  m
 */
@Override
public String toString() {
    StringBuilder builder = new StringBuilder("[");
    builder.append(ClassUtils.getShortName(getClass())).append(" -> ").append(getMBeanName()).append(".")
            .append(getOperationName()).append("(").append(Arrays.deepToString(getOperationArguments()))
            .append(")").append("]");
    return builder.toString();
}

From source file:Main.java

@SuppressWarnings("rawtypes")
private static void printObject(ThreadLocal threadLocal, Object obj) {
    String threadLocalCls = threadLocal.getClass().getName();
    if (threadLocal instanceof NamedThreadLocal) {
        System.out.print("......Spring threadlocal var: " + threadLocal + "=");
    } else if (obj == null || threadLocalCls.startsWith("java") || threadLocalCls.startsWith("sun")) {
        return;/* www .ja v  a  2s  .  c o m*/
    }
    if (obj instanceof Object[]) {
        System.out.println(Arrays.deepToString((Object[]) obj));
    } else if (obj instanceof java.lang.ref.Reference) {
        java.lang.ref.Reference ref = (Reference) obj;
        System.out.println(" ref " + ref.getClass().getName() + " ref to " + ref.get());
    } else if (obj instanceof ThreadLocal) {
        ThreadLocal threadLc = (ThreadLocal) obj;
        String clssName = threadLc.getClass().getName();
        System.out.println(threadLc.getClass().getName() + "=" + threadLc.get());
    } else {
        System.out.println(obj);
    }
}

From source file:app.sunstreak.yourpisd.net.Parser.java

public static boolean accessGrantedGradebook(String[] gradebookCredentials) {
    System.out.println(Arrays.deepToString(gradebookCredentials));
    return !(gradebookCredentials[0].equals(GRADEBOOK_BAD_USERNAME));
}

From source file:com.runwaysdk.business.generation.EclipseCompiler.java

/**
 * Calls the ECJ and wraps any errors in a {@link CompilerException}
 * /* w ww. j a  v a  2  s.  c o  m*/
 * @param args Arguments for the compiler
 * @throws CompilerException if compilation fails
 */
private void callECJ(String args[]) {
    Log log = LogFactory.getLog(COMPILER_LOG);
    log.trace(Arrays.deepToString(args));

    StringWriter output = new StringWriter();
    StringWriter errors = new StringWriter();
    Main compiler = new Main(new PrintWriter(output), new PrintWriter(errors), false);

    compiler.compile(args);

    String message = errors.toString();

    if (message.length() > 0) {
        String error = "Errors found during compilation:\n" + message;
        throw new CompilerException(error, message);
    }
}

From source file:org.opendds.jms.common.util.Logger.java

public void error(String message, String[] args) {
    if (isErrorEnabled()) {
        error(message, Arrays.deepToString(args));
    }
}