01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.netui.compiler.typesystem.impl.env;
20:
21: import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition;
22: import org.apache.beehive.netui.compiler.typesystem.impl.DelegatingImpl;
23:
24: import java.io.File;
25:
26: public class SourcePositionImpl extends DelegatingImpl implements
27: SourcePosition {
28: protected SourcePositionImpl(
29: com.sun.mirror.util.SourcePosition delegate) {
30: super (delegate);
31: }
32:
33: public static SourcePosition get(
34: com.sun.mirror.util.SourcePosition delegate) {
35: return delegate != null ? new SourcePositionImpl(delegate)
36: : null;
37: }
38:
39: public File file() {
40: return getDelegate().file();
41: }
42:
43: public int line() {
44: return getDelegate().line();
45: }
46:
47: public int column() {
48: return getDelegate().column();
49: }
50:
51: protected com.sun.mirror.util.SourcePosition getDelegate() {
52: return (com.sun.mirror.util.SourcePosition) super.getDelegate();
53: }
54: }
|