1. /*
  2. * @(#)SourcePosition.java 1.2 04/07/16
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.mirror.util;
  8. import java.io.File;
  9. /**
  10. * Represents a position in a source file.
  11. *
  12. * @author Joseph D. Darcy
  13. * @author Scott Seligman
  14. * @version 1.2 04/07/16
  15. * @since 1.5
  16. */
  17. public interface SourcePosition {
  18. /**
  19. * Returns the source file containing this position.
  20. *
  21. * @return the source file containing this position; never null
  22. */
  23. File file();
  24. /**
  25. * Returns the line number of this position. Lines are numbered
  26. * starting with 1.
  27. *
  28. * @return the line number of this position, or 0 if the line
  29. * number is unknown or not applicable
  30. */
  31. int line();
  32. /**
  33. * Returns the column number of this position. Columns are numbered
  34. * starting with 1.
  35. *
  36. * @return the column number of this position, or 0 if the column
  37. * number is unknown or not applicable
  38. */
  39. int column();
  40. }