KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > compiler > xdoclet > typesystem > impl > env > MessagerImpl


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.compiler.xdoclet.typesystem.impl.env;
19
20 import org.apache.beehive.netui.compiler.typesystem.env.Messager;
21 import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition;
22 import org.apache.beehive.netui.xdoclet.NetuiDocletTask;
23 import xjavadoc.SourceClass;
24
25 public class MessagerImpl
26         implements Messager
27 {
28     private String JavaDoc _sourceFilePath;
29     
30     protected MessagerImpl( SourceClass sourceClass )
31     {
32         _sourceFilePath = sourceClass.getFile().getPath();
33     }
34     
35     public void printError( String JavaDoc s )
36     {
37         NetuiDocletTask.addError( s, _sourceFilePath, -1 );
38     }
39
40     public void printError( SourcePosition sourcePosition, String JavaDoc s )
41     {
42         assert sourcePosition != null;
43         NetuiDocletTask.addError( s, sourcePosition );
44     }
45
46     public void printWarning( String JavaDoc s )
47     {
48         NetuiDocletTask.addWarning( s, _sourceFilePath, -1 );
49     }
50
51     public void printWarning( SourcePosition sourcePosition, String JavaDoc s )
52     {
53         assert sourcePosition != null;
54         NetuiDocletTask.addWarning( s, sourcePosition );
55     }
56
57     public void printNotice( String JavaDoc s )
58     {
59         assert false : "NYI";
60         throw new UnsupportedOperationException JavaDoc( "NYI" );
61     }
62
63     public void printNotice( SourcePosition sourcePosition, String JavaDoc s )
64     {
65         assert false : "NYI";
66         throw new UnsupportedOperationException JavaDoc( "NYI" );
67     }
68 }
69
Popular Tags