1 package net.sourceforge.phpeclipse.phpeditor.phpparser;
3 import java.util.ArrayList;
6 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
7 import org.eclipse.jface.resource.ImageDescriptor;
12 public class PHPClassDeclaration extends PHPSegment {
15 public PHPClassDeclaration(Object parent, String name, int index) {
16 super(parent, name, index);
17 fFunctions = new ArrayList();
20 public List getList( ) {
24 * Appends the specified function declaration
26 * @param o function declaration to be appended to this list.
27 * @return <tt>true</tt> (as per the general contract of Collection.add).
29 public boolean add(PHPSegment o) {
30 return fFunctions.add(o);
34 * Returns the function declaration at the specified position in this list.
36 * @param index index of function declaration to return.
37 * @return the function declaration at the specified position in this list.
38 * @throws IndexOutOfBoundsException if index is out of range <tt>(index
39 * < 0 || index >= size())</tt>.
41 public PHPSegment get(int index) {
42 return (PHPSegment) fFunctions.get(index);
46 * Returns the number of declarations in this list.
48 * @return the number of declarations in this list.
51 return fFunctions.size();
54 public ImageDescriptor getImage() {
55 return PHPUiImages.DESC_CLASS;