//# 0 errors, 16 messages
//#
/*
    //#ArrayCellRenderer.java:1:1: class: com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer
    //#ArrayCellRenderer.java:1:1: method: com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.ui_swing.components.renderers;

import java.util.Arrays;

import javax.swing.table.DefaultTableCellRenderer;

/**
 * Renders an array as an inline string.
 */
public final class ArrayCellRenderer extends DefaultTableCellRenderer {
    
    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 1;
    
    /** Creates a new instance of ArrayCellRenderer. */
    public ArrayCellRenderer() {
        super();
    //#ArrayCellRenderer.java:43: method: void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer()
    //#input(void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer()): this
    }
    //#ArrayCellRenderer.java:44: end of method: void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer()
    
    /** {@inheritDoc} */
    @Override
    public void setValue(final Object value) {
        final String response = Arrays.toString((String[]) value);
    //#ArrayCellRenderer.java:49: method: void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.setValue(Object)
    //#input(void setValue(Object)): this
    //#input(void setValue(Object)): value
        setText(response.substring(1, response.length() - 1));
    //#ArrayCellRenderer.java:50: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer:setText(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer
    //#    method: void setValue(Object)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer:setText(String)
    }
    //#ArrayCellRenderer.java:51: end of method: void com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.setValue(Object)
    
}
    //#output(com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/renderers/ArrayCellRenderer]
    //#output(com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init): __Dispatch_Table.setValue(Ljava/lang/Object;)V
    //#post(com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/renderers/ArrayCellRenderer] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init): __Dispatch_Table.setValue(Ljava/lang/Object;)V == &setValue
    //#ArrayCellRenderer.java:: end of method: com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer.com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer__static_init
    //#ArrayCellRenderer.java:: end of class: com.dmdirc.addons.ui_swing.components.renderers.ArrayCellRenderer
