blob: fb5a8acd88eb90eb8dd20e69c683f03354898acb [file] [log] [blame]
/*
* Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package com.sun.xml.internal.ws.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.sun.xml.internal.bind.api.TypeReference;
/**
* Models Wrapper parameter
*
* @author Vivek Pandey
*/
public class WrapperParameter extends Parameter{
public WrapperParameter(TypeReference type, Mode mode, int index) {
super(type, mode, index);
}
/*
* (non-Javadoc)
*
* @see com.sun.xml.internal.ws.rt.model.Parameter#isWrapperStyle()
*/
@Override
public boolean isWrapperStyle() {
return true;
}
/**
* @return Returns the wrapperChildren.
*/
public List<Parameter> getWrapperChildren() {
return Collections.unmodifiableList(wrapperChildren);
}
/**
* @param wrapperChildren
* The wrapperChildren to set.
*/
public void addWrapperChildren(List<Parameter> wrapperChildren) {
this.wrapperChildren.addAll(wrapperChildren);
}
/**
* @param wrapperChild
*/
public void addWrapperChild(Parameter wrapperChild) {
wrapperChildren.add(wrapperChild);
}
/**
* removes the wrapper child from the given index
* @param index
* @return
*/
public Parameter removeWrapperChild(int index){
return wrapperChildren.remove(index);
}
public void clear(){
wrapperChildren.clear();
}
protected final List<Parameter> wrapperChildren = new ArrayList<Parameter>();
}