01: /**
02: * MVEL (The MVFLEX Expression Language)
03: *
04: * Copyright (C) 2007 Christopher Brock, MVFLEX/Valhalla Project and the Codehaus
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: */package org.mvel.ast;
19:
20: import org.mvel.integration.VariableResolverFactory;
21:
22: /**
23: * @author Christopher Brock
24: */
25: public class LineLabel extends ASTNode {
26: private String sourceFile;
27: private int lineNumber;
28:
29: public LineLabel(int lineNumber) {
30: this .lineNumber = lineNumber;
31: this .fields = -1;
32: }
33:
34: public LineLabel(String sourceFile, int lineNumber) {
35: this .lineNumber = lineNumber;
36: this .sourceFile = sourceFile;
37: this .fields = -1;
38: }
39:
40: public String getSourceFile() {
41: return sourceFile;
42: }
43:
44: public void setSourceFile(String sourceFile) {
45: this .sourceFile = sourceFile;
46: }
47:
48: public int getLineNumber() {
49: return lineNumber;
50: }
51:
52: public void setLineNumber(int lineNumber) {
53: this .lineNumber = lineNumber;
54: }
55:
56: public Object getReducedValueAccelerated(Object ctx,
57: Object this Value, VariableResolverFactory factory) {
58: return null;
59: }
60:
61: public Object getReducedValue(Object ctx, Object this Value,
62: VariableResolverFactory factory) {
63: return null;
64: }
65:
66: public String toString() {
67: return "[SourceLine:" + lineNumber + "]";
68: }
69: }
|