alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.vcscore.caching;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.StringTokenizer;
import java.io.File;

import org.netbeans.api.vcs.FileStatusInfo;

import org.openide.util.NbBundle;

import org.netbeans.modules.vcscore.cache.*;
import org.netbeans.modules.vcscore.commands.VcsCommand;
import org.netbeans.modules.vcscore.commands.VcsCommandIO;
import org.netbeans.modules.vcscore.Variables;
import org.netbeans.modules.vcscore.util.VcsUtilities;

/**
 * This class provides static methods for creation cache data from refresh command.
 *
 * @author  Martin Entlicher
 */
public class RefreshCommandSupport extends Object {

    /**
     * When the attributes of the set of files differ, do not show them.
     */
    public static final int MULTI_FILES_ANNOTATION_EMPTY = 0;
    /**
     * When the attributes of the set of files differ, show them as a list.
     */
    public static final int MULTI_FILES_ANNOTATION_LIST = 1;
    /**
     * When the attributes of the set of files differ, show a "Not In Synch" status instead.
     */
    public static final int MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR = 2;

    /* ${fileName} $[? status] [[${status}$[? revision] [, revision] []]] []$[? revision] [revision] []$[? locker] [(${locker})] [] */
    public static final String DEFAULT_ANNOTATION_PATTERN = "${"+StatusFormat.ANNOTATION_PATTERN_FILE_NAME+"}"+ // NOI18N
    "$[? "+StatusFormat.ANNOTATION_PATTERN_STATUS+"] "+ // NOI18N
        "[ [${"+StatusFormat.ANNOTATION_PATTERN_STATUS+"}$[? "+StatusFormat.ANNOTATION_PATTERN_REVISION+"] [; ${"+StatusFormat.ANNOTATION_PATTERN_REVISION+"}] []]] "+ // NOI18N
        "["+"$[? "+StatusFormat.ANNOTATION_PATTERN_REVISION+"] [ ${"+StatusFormat.ANNOTATION_PATTERN_REVISION+"}] []"+"]"+ // NOI18N
    "$[? "+StatusFormat.ANNOTATION_PATTERN_LOCKER+"][ (${"+StatusFormat.ANNOTATION_PATTERN_LOCKER+"})] []" + // NOI18N
    "$[? "+StatusFormat.ANNOTATION_PATTERN_STICKY+"][ (${"+StatusFormat.ANNOTATION_PATTERN_STICKY+"})] []"; // NOI18N
    public static final int[] DEFAULT_MULTI_FILES_ANNOTATION_TYPES = { MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR, MULTI_FILES_ANNOTATION_LIST, MULTI_FILES_ANNOTATION_EMPTY,
                                                                       MULTI_FILES_ANNOTATION_EMPTY, MULTI_FILES_ANNOTATION_EMPTY, MULTI_FILES_ANNOTATION_EMPTY,
                                                                       MULTI_FILES_ANNOTATION_EMPTY, MULTI_FILES_ANNOTATION_EMPTY, MULTI_FILES_ANNOTATION_EMPTY };
    public static final String DEFAULT_MULTI_FILES_ANNOTATION_DELIMETER = ", "; // NOI18N

    private static String local = null;
    
    /** Creates new RefreshCommandSupport */
    private RefreshCommandSupport() {
    }

    /*
     * Create a new VcsCacheFile or VcsCacheDir from reader data
     * @param elements the data obtained from the reader
     * @param list the list command
     * @return the created VcsFile
     *
    public static CacheFile matchToFile(String[] elements, String cacheName, File parent) {
        return matchToFile(elements, null, cacheName, parent);
    }
     */

    /**
     * Create a new VcsCacheFile or VcsCacheDir from reader data
     * @param elements the data obtained from the reader
     * @param cacheName the name of the cache to create the CacheFile in
     * @param parent the parent file
     * @return the created VcsFile
     * @throws IllegalArgumentException if the file name element is null
     *                                  or if the number of elements is not sufficient
     */
    public static CacheFile matchToFile(String[] elements,
                                        String cacheName, File parent) {
        if (elements.length < StatusFormat.NUM_ELEMENTS) {
            throw new IllegalArgumentException("The number of elements ("+elements.length+") < "+StatusFormat.NUM_ELEMENTS); // NOI18N
        }
        CacheFile file = new VcsCacheFile(cacheName);

        String name = elements[StatusFormat.ELEMENT_INDEX_FILE_NAME];
        if (name == null) throw new IllegalArgumentException("File name element is missing."); // NOI18N
        file.setName(name);
        if (name.endsWith("/")) { // NOI18N
            file = CacheHandler.getInstance().getCacheFile(
                    new File(parent, name.substring(0,name.length()-1)),
                    CacheHandler.STRAT_REFRESHING, cacheName);
            if (file == null) {
                file = new VcsCacheDir(cacheName, new File(parent, name.substring(0,name.length()-1)));
            }
        }
        
        matchToFile(elements, file);
        return file;
    }
    
    public static CacheFile matchToExistingFile(String[] elements,
                                                String cacheName, File parent) {
        if (elements.length < StatusFormat.NUM_ELEMENTS) {
            throw new IllegalArgumentException("The number of elements ("+elements.length+") < "+StatusFormat.NUM_ELEMENTS); // NOI18N
        }
        String name = elements[StatusFormat.ELEMENT_INDEX_FILE_NAME];
        if (name == null) throw new IllegalArgumentException("File name element is missing."); // NOI18N
        boolean fileIsDir = name.endsWith("/"); // NOI18N
        if (fileIsDir) name = name.substring(0, name.length() - 1);
        CacheFile file = CacheHandler.getInstance().getCacheFile(
                            new File(parent, name), CacheHandler.STRAT_REFRESHING, cacheName);
        if (file == null) {
            if (fileIsDir) {
                file = new VcsCacheDir(cacheName, new File(parent, name));
            } else {
                file = new VcsCacheFile(cacheName);
            }
            file.setName(name);
        }
        matchToFile(elements, file);
        // in case the file existed and was local, it must not be local, because it was
        // obtained by a refresh command.
        if (file instanceof VcsCacheFile) ((VcsCacheFile) file).setLocal(false);
        if (file instanceof VcsCacheDir) ((VcsCacheDir) file).setLocal(false);
        return file;
    }
    
    /**
     * Fill a CacheFile with reader data
     * @param elements the data obtained from the reader
     * @param file the CacheFile
     * @return the filled CacheFile
     * @throws IllegalArgumentException if the file name element is null
     *                                  or if the number of elements is not sufficient
     */
    public static CacheFile matchToFile(String[] elements, CacheFile file) {
        matchToFile(elements, (VcsCacheFile.VcsPersistentData) file.getPersistentData());
        return file;
    }
    
    /**
     * Fill the PersistentData with reader data
     * @param elements the data obtained from the reader
     * @param data the CacheFile.PersistentData
     * @return the filled data
     * @throws IllegalArgumentException if the file name element is null
     *                                  or if the number of elements is not sufficient
     */
    public static VcsCacheFile.VcsPersistentData matchToFile(String[] elements,
                                                             VcsCacheFile.VcsPersistentData data) {
        if (elements.length < StatusFormat.NUM_ELEMENTS) {
            throw new IllegalArgumentException("The number of elements ("+elements.length+") < "+StatusFormat.NUM_ELEMENTS);
        }
        //System.err.println("matchToFile("+VcsUtilities.arrayToString(elements)+")");

        String status = elements[StatusFormat.ELEMENT_INDEX_STATUS];
        if (status != null) data.setStatus(status.trim());
        
        String locker = elements[StatusFormat.ELEMENT_INDEX_LOCKER];
        if (locker != null) data.setLocker (locker.trim());
        
        String revision = elements[StatusFormat.ELEMENT_INDEX_REVISION];
        if (revision != null) data.setRevision(revision.trim());
        
        String sticky = elements[StatusFormat.ELEMENT_INDEX_STICKY];
        if (sticky != null) data.setSticky(sticky.trim());
        
        String attr = elements[StatusFormat.ELEMENT_INDEX_ATTR];
        if (attr != null) data.setAttr (attr.trim());
        
        String date = elements[StatusFormat.ELEMENT_INDEX_DATE];
        if (date != null) data.setDate (date.trim());
        
        String time = elements[StatusFormat.ELEMENT_INDEX_TIME];
        if (time != null) data.setTime (time.trim());
        
        String size = elements[StatusFormat.ELEMENT_INDEX_SIZE];
        if (size != null) {
            try {
                data.setSize (Integer.parseInt(size.trim()));
            }
            catch (NumberFormatException e) {
                data.setSize (0);
            }
        }
        return data;
    }

    public static String[] makeElements(CacheFile file) {
        return makeElements((VcsCacheFile.VcsPersistentData) file.getPersistentData());
    }
    
    public static String[] makeElements(VcsCacheFile.VcsPersistentData data) {
        String[] elements = new String[StatusFormat.NUM_ELEMENTS];
        elements[StatusFormat.ELEMENT_INDEX_FILE_NAME] = data.getName();
        elements[StatusFormat.ELEMENT_INDEX_STATUS] = data.getStatus();
        elements[StatusFormat.ELEMENT_INDEX_LOCKER] = data.getLocker();
        elements[StatusFormat.ELEMENT_INDEX_REVISION] = data.getRevision();
        elements[StatusFormat.ELEMENT_INDEX_STICKY] = data.getSticky();
        elements[StatusFormat.ELEMENT_INDEX_ATTR] = data.getAttr();
        elements[StatusFormat.ELEMENT_INDEX_DATE] = data.getDate();
        elements[StatusFormat.ELEMENT_INDEX_TIME] = data.getTime();
        elements[StatusFormat.ELEMENT_INDEX_SIZE] = Integer.toString(data.getSize());
        return elements;
    }
    
    /*
    public static String[] getElementsFromLine(String line) {
        boolean dir = false;
        StringTokenizer tok = new StringTokenizer(line, "/");
        String[] elements = new String[NUM_ELEMENTS];
        for(int i = 0; tok.hasMoreTokens() && i < NUM_ELEMENTS; i++) {
            String element = tok.nextToken();
            if (i == 0 && DIRECTORY_CACHE_ID.equals(element)) {
                dir = true;
                i--;
                continue;
            }
            elements[i] = element;
        }
        if (dir) elements[ELEMENT_INDEX_FILE_NAME] += "/";
        return elements;
    }
     */

    /**
     * Get the annotation line for a file.
     * @param name the object file name
     * @param fullName the full path of the file with respect to the filesystem root
     * @param annotationPattern the pattern how the annotation should be displayed
     * @param statusProvider the provider of the status attributes information
     * @return the annotation pattern filled up with proper attributes
     */
    public static String getStatusAnnotation(String name, String fullName, String annotationPattern,
                                             FileStatusProvider statusProvider) {
        return getStatusAnnotation(name, fullName, annotationPattern, statusProvider, null);
    }
    
    /**
     * Get the annotation line for a file.
     * @param name the object file name
     * @param fullName the full path of the file with respect to the filesystem root
     * @param annotationPattern the pattern how the annotation should be displayed
     * @param statusProvider the provider of the status attributes information
     * @return the annotation pattern filled up with proper attributes
     */
    public static String getStatusAnnotation(String name, String fullName, String annotationPattern,
                                             FileStatusProvider statusProvider, Hashtable additionalVars) {
        Hashtable vars = new Hashtable();
        if (additionalVars != null) vars.putAll(additionalVars);
        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, name);
        //String status = statusProvider.getFileStatus(fullName);
        FileStatusInfo statusInfo = statusProvider.getFileStatusInfo(fullName);
        String status;
        if (statusInfo != null) {
            status = statusInfo.getDisplayName();
        } else {
            status = statusProvider.getFileStatus(fullName);
        }
        return createStatusAnnotation(status, vars, fullName, annotationPattern, statusProvider);
    }
    
    /**
     * Get the annotation line in a HTML format for a file.
     * @param name the object file name
     * @param fullName the full path of the file with respect to the filesystem root
     * @param annotationPattern the pattern how the annotation should be displayed
     * @param statusProvider the provider of the status attributes information
     * @return the annotation pattern filled up with proper attributes
     */
    public static String getHtmlStatusAnnotation(String name, String fullName, String annotationPattern,
                                                 FileStatusProvider statusProvider, Hashtable additionalVars) {
        Hashtable vars = new Hashtable();
        if (additionalVars != null) vars.putAll(additionalVars);
        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, name);
        if ("${fileName}".equals(annotationPattern)) { // NOI18N
            return Variables.expand(vars, annotationPattern, false);
        }
        //String status = statusProvider.getFileStatus(fullName);
        FileStatusInfo statusInfo = statusProvider.getFileStatusInfo(fullName);
        String status;
        if (statusInfo != null) {
            status = statusInfo.getDisplayName();
            if (statusInfo instanceof javax.swing.colorchooser.ColorSelectionModel) {
                java.awt.Color c = ((javax.swing.colorchooser.ColorSelectionModel) statusInfo).getSelectedColor();
                if (c != null) {
                    String r = Integer.toHexString(c.getRed());
                    if (r.length() == 1) r = "0"+r;
                    String g = Integer.toHexString(c.getGreen());
                    if (g.length() == 1) g = "0"+g;
                    String b = Integer.toHexString(c.getBlue());
                    if (b.length() == 1) b = "0"+b;
                    status = "" + status + ""; //NOI18N
                }
            }
        } else {
            status = statusProvider.getFileStatus(fullName);
        }
        return createStatusAnnotation(status, vars, fullName, annotationPattern, statusProvider);
    }
    
    private static String createStatusAnnotation(String status, Hashtable vars,
                                                 String fullName, String annotationPattern,
                                                 FileStatusProvider statusProvider) {
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_STATUS, status);
        status = statusProvider.getFileLocker(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_LOCKER, status);
        status = statusProvider.getFileRevision(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_REVISION, status);
        status = statusProvider.getFileSticky(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_STICKY, status);
        status = statusProvider.getFileSize(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_SIZE, status);
        status = statusProvider.getFileAttribute(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_ATTR, status);
        status = statusProvider.getFileDate(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_DATE, status);
        status = statusProvider.getFileTime(fullName);
        if (status != null) vars.put(StatusFormat.ANNOTATION_PATTERN_TIME, status);
        //System.out.println("vars = "+vars+",\npattern = "+annotationPattern+",\nexpansion = "+Variables.expandFast(vars, annotationPattern, false));
        return Variables.expand(vars, annotationPattern, false);
    }
    
    /**
     * Get the annotation line for a list of files.
     * @param name the object file name
     * @param fullName the full path of the file with respect to the filesystem root
     * @param annotationPattern the pattern how the annotation should be displayed
     * @param statusProvider the provider of the status attributes information
     * @param multiFilesAnnotationTypes the annotation types for individual attributes.
     *        Values of this files are MULTI_FILES_ANNOTATION_* constants.
     * @return the annotation pattern filled up with proper attributes
     */
    public static String getStatusAnnotation(String name, ArrayList files, String annotationPattern,
                                             FileStatusProvider statusProvider, int[] multiFilesAnnotationTypes) {
        Hashtable vars = new Hashtable();
        ArrayList attributes = new ArrayList();
        int n = files.size();
        if (n == 0) return name;
        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, name);
        String trans = null;
        for(int i = 0 ; i < n; i++) {
            FileStatusInfo statusInfo = statusProvider.getFileStatusInfo((String) files.get(i));
            String status;
            if (statusInfo != null) {
                status = statusInfo.getDisplayName();
            } else {
                status = statusProvider.getFileStatus((String) files.get(i));
            }
            if (!attributes.contains(status)) {
                attributes.add(status);
            }
        }
        String attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_STATUS],
                                   statusProvider.getNotInSynchStatus());
        return createStatusAnnotation(attr, vars, attributes, files, annotationPattern,
                                      statusProvider, multiFilesAnnotationTypes);
    }
    
    /**
     * Get the annotation line in a HTML format for a list of files.
     * @param name the object file name
     * @param fullName the full path of the file with respect to the filesystem root
     * @param annotationPattern the pattern how the annotation should be displayed
     * @param statusProvider the provider of the status attributes information
     * @param multiFilesAnnotationTypes the annotation types for individual attributes.
     *        Values of this files are MULTI_FILES_ANNOTATION_* constants.
     * @return the annotation pattern filled up with proper attributes
     */
    public static String getHtmlStatusAnnotation(String name, ArrayList files, String annotationPattern,
                                                 FileStatusProvider statusProvider, int[] multiFilesAnnotationTypes) {
        Hashtable vars = new Hashtable();
        ArrayList attributes = new ArrayList();
        int n = files.size();
        if (n == 0) return name;
        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, name);
        String trans = null;
        for(int i = 0 ; i < n; i++) {
            FileStatusInfo statusInfo = statusProvider.getFileStatusInfo((String) files.get(i));
            String status;
            if (statusInfo != null) {
                status = statusInfo.getDisplayName();
                if (statusInfo instanceof javax.swing.colorchooser.ColorSelectionModel) {
                    java.awt.Color c = ((javax.swing.colorchooser.ColorSelectionModel) statusInfo).getSelectedColor();
                    if (c != null) {
                        String r = Integer.toHexString(c.getRed());
                        if (r.length() == 1) r = "0"+r;
                        String g = Integer.toHexString(c.getGreen());
                        if (g.length() == 1) g = "0"+g;
                        String b = Integer.toHexString(c.getBlue());
                        if (b.length() == 1) b = "0"+b;
                        status = "" + status + ""; //NOI18N
                    }
                }
            } else {
                status = statusProvider.getFileStatus((String) files.get(i));
            }
            if (!attributes.contains(status)) {
                attributes.add(status);
            }
        }
        String attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_STATUS],
                                   statusProvider.getNotInSynchStatus());
        return createStatusAnnotation(attr, vars, attributes, files, annotationPattern,
                                      statusProvider, multiFilesAnnotationTypes);
    }
    
    private static String createStatusAnnotation(String attr, Hashtable vars, ArrayList attributes,
                                                 ArrayList files, String annotationPattern,
                                                 FileStatusProvider statusProvider,
                                                 int[] multiFilesAnnotationTypes) {
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_STATUS, attr);
        attributes.clear();
        int n = files.size();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileLocker((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_LOCKER],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_LOCKER, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileRevision((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_REVISION],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_REVISION, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileSticky((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_STICKY],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_STICKY, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileAttribute((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_ATTR],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_ATTR, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileSize((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_SIZE],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_SIZE, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileDate((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_DATE],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_DATE, attr);
        attributes.clear();
        for(int i = 0 ; i < n; i++) {
            attributes.add(statusProvider.getFileTime((String) files.get(i)));
        }
        attr = getAttribute(attributes, multiFilesAnnotationTypes[StatusFormat.ELEMENT_INDEX_TIME],
                            statusProvider.getNotInSynchStatus());
        if (attr != null) vars.put(StatusFormat.ANNOTATION_PATTERN_TIME, attr);
        return Variables.expand(vars, annotationPattern, false);
    }
    
    /* Gets an annotation line for ignored file
     *  @param String name, the name of file object
     *  @param String fullname, the fully clasified name within filesystem
     *  @param String annotationPattern, the annotation pattern used to build an annotation
     *  @return String created annotation
     *
    public static String getStatusAnnotation (String name, String fullname, String annotationPattern) {
        Hashtable vars = new Hashtable ();
        vars.put (ANNOTATION_PATTERN_FILE_NAME, name);
        if (local == null) {
            local = NbBundle.getBundle (RefreshCommandSupport.class).getString("CTL_StatusIgnored");
        }
        vars.put (ANNOTATION_PATTERN_STATUS,local);
        return Variables.expand (vars, annotationPattern, false);
    }
     */
    
    private static String getAttribute(ArrayList attributes, int annotationType, String nSynch) {
        boolean differ;
        Object firstObj = attributes.get(0);
        if (firstObj == null) return null;
        String first = (String) firstObj;
        int n = attributes.size();
        int i = 1;
        for (i = 1; i < n; i++) {
            if (!firstObj.equals(attributes.get(i))) {
                //System.out.println("first = "+firstObj+" != "+attributes.get(i));
                break;
            }
        }
        differ = i < n;
        switch (annotationType) {
            case MULTI_FILES_ANNOTATION_EMPTY:
                if (differ) return ""; // NOI18N
                else return first;
            case MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR:
                if (differ) return nSynch;
                else return first;
            case MULTI_FILES_ANNOTATION_LIST:
                if (!differ) return first;
                StringBuffer buf = new StringBuffer(first);
                for (int j = 1; j < n; j++) {
                    buf.append(DEFAULT_MULTI_FILES_ANNOTATION_DELIMETER + (String) attributes.get(j));
                }
                return buf.toString();
            default: return ""; // NOI18N
        }
    }
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.