KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > runtime > reflect > SourceLocationImpl


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
14
15 package org.aspectj.runtime.reflect;
16
17 import org.aspectj.lang.reflect.SourceLocation;
18
19 class SourceLocationImpl implements SourceLocation {
20     Class JavaDoc withinType;
21     String JavaDoc fileName;
22     int line;
23     
24     SourceLocationImpl(Class JavaDoc withinType, String JavaDoc fileName, int line) {
25         this.withinType = withinType;
26         this.fileName = fileName;
27         this.line = line;
28     }
29     
30     public Class JavaDoc getWithinType() { return withinType; }
31     public String JavaDoc getFileName() { return fileName; }
32     public int getLine() { return line; }
33     public int getColumn() { return -1; }
34     
35     public String JavaDoc toString() {
36         return getFileName() + ":" + getLine();
37     }
38 }
39
40
Popular Tags