You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ISourceLocation.java 2.0KB

21 lat temu
21 lat temu
21 lat temu
14 lat temu
21 lat temu
14 lat temu
14 lat temu
14 lat temu
14 lat temu
14 lat temu
21 lat temu
14 lat temu
14 lat temu
21 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/epl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * ******************************************************************/
  13. package org.aspectj.bridge;
  14. import java.io.File;
  15. /**
  16. * Represent source location as a starting line/column and ending line in a source file. Implementations should be immutable. XXX
  17. * why?
  18. *
  19. * @see org.aspectj.lang.reflect.SourceLocation
  20. */
  21. public interface ISourceLocation extends java.io.Serializable {
  22. int MAX_LINE = Integer.MAX_VALUE / 2;
  23. int MAX_COLUMN = MAX_LINE;
  24. /** non-null but empty (nonexisting) File constant */
  25. File NO_FILE = new File("ISourceLocation.NO_FILE");
  26. /** signal that column is not known */
  27. int NO_COLUMN = Integer.MIN_VALUE + 1;
  28. /** non-null but empty constant source location */
  29. ISourceLocation EMPTY = new SourceLocation(NO_FILE, 0, 0, 0);
  30. /**
  31. * @return File source or NO_FILE if the implementation requires a non-null result or null otherwise
  32. */
  33. File getSourceFile();
  34. /** @return 0..MAX_LINE */
  35. int getLine();
  36. /**
  37. * @return int 0..MAX_COLUMN actual column or 0 if column input was ISourceLocation.NO_COLUMN
  38. */
  39. int getColumn();
  40. /**
  41. * @return offset into file
  42. */
  43. int getOffset();
  44. /** @return getLine()..MAX_LINE */
  45. int getEndLine();
  46. /** @return String application-specific context for source */
  47. String getContext();
  48. /**
  49. * In the cases where getSourceFile().getName() returns a class file (for example when we have a binary aspect) this should
  50. * return the name of the source file (for example BinaryAspect.aj)
  51. *
  52. * @return the name of the source file
  53. */
  54. String getSourceFileName();
  55. }