Java Aspectj Usage strip(String[] src, String[] toStrip)

Here you can find the source of strip(String[] src, String[] toStrip)

Description

strip

License

Open Source License

Declaration

public static String[] strip(String[] src, String[] toStrip) 

Method Source Code

//package com.java2s;
/* *******************************************************************
 * Copyright (c) 1999-2000 Xerox Corporation. 
 * All rights reserved. //from   www. j a  va2s . com
 * This program and the accompanying materials are made available 
 * under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution and is available at 
 * http://www.eclipse.org/legal/epl-v10.html 
 *  
 * Contributors: 
 *     Xerox/PARC     initial implementation 
 * ******************************************************************/

import java.util.List;

public class Main {
    private static final String[] NONE = new String[0];

    public static String[] strip(String[] src, String[] toStrip) {
        if (null == toStrip) {
            return strip(src, NONE);
        } else if (null == src) {
            return strip(NONE, toStrip);
        }
        List slist = org.aspectj.util.LangUtil.arrayAsList(src);
        List tlist = org.aspectj.util.LangUtil.arrayAsList(toStrip);
        slist.removeAll(tlist);
        return (String[]) slist.toArray(NONE);
    }

    public static List arrayAsList(Object[] ra) {
        return org.aspectj.util.LangUtil.arrayAsList(ra);
    }
}

Related

  1. readAjAttributes(String classname, Attribute[] as, ISourceContext context, World w, AjAttribute.WeaverVersionInfo version, ConstantPoolReader dataDecompressor)
  2. renderArgs(JoinPoint jp)
  3. renderJoinPoint(JoinPoint jp)
  4. resolveFileName(final String fileName)
  5. setSourceLine(InstructionHandle ih, int lineNumber)
  6. type(final JoinPoint joinPoint)
  7. typeName(final JoinPoint joinPoint)
  8. unWrapJoinPoint(final JoinPoint point)