/plugins/PHPParser/tags/PHPParser-1.4.1/src/net/sourceforge/phpdt/internal/compiler/parser/Outlineable.java

# · Java · 78 lines · 11 code · 7 blank · 60 comment · 0 complexity · f9fe04138f17b99b6cc1a1800b08df5a MD5 · raw file

  1. /*
  2. * Outlineable.java
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2003, 2010 Matthieu Casanova
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. package net.sourceforge.phpdt.internal.compiler.parser;
  23. import gatchan.phpparser.project.itemfinder.PHPItem;
  24. /**
  25. * Here is an interface that object that can be in the outline view must implement.
  26. *
  27. * @author Matthieu Casanova
  28. * @version $Id: Outlineable.java 18499 2010-09-04 10:46:44Z kpouer $
  29. */
  30. public interface Outlineable
  31. {
  32. /**
  33. * Returns the parent of the item.
  34. *
  35. * @return the parent
  36. */
  37. Outlineable getParent();
  38. /**
  39. * Give the name of the item.
  40. *
  41. * @return the name of the item
  42. */
  43. String getName();
  44. /**
  45. * Returns the item type.
  46. * in {@link PHPItem#CLASS},{@link PHPItem#FIELD}, {@link PHPItem#INTERFACE}, {@link PHPItem#METHOD}
  47. *
  48. * @return the item type
  49. */
  50. int getItemType();
  51. /**
  52. * Add a children.
  53. *
  54. * @param o children the outlineable
  55. * @return true if it was added
  56. */
  57. boolean add(Outlineable o);
  58. /**
  59. * Returns the children at index.
  60. *
  61. * @param index the index
  62. * @return the children at index
  63. */
  64. Outlineable get(int index);
  65. /**
  66. * Returns how many children this item has.
  67. *
  68. * @return the children count
  69. */
  70. int size();
  71. }