KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > velocity > app > event > NullSetEventHandler


1 package org.apache.velocity.app.event;
2
3 /*
4  * Copyright 2001,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
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
19 /**
20  * Event handler : lets an app approve / veto
21  * writing a log message when RHS of #set() is null.
22  *
23  * @author <a HREF="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
24  * @version $Id: NullSetEventHandler.java,v 1.2.12.1 2004/03/03 23:22:53 geirm Exp $
25  */

26 public interface NullSetEventHandler extends EventHandler
27 {
28     /**
29      * Called when the RHS of a #set() is null, which will result
30      * in a null LHS.
31      *
32      * @param lhs reference literal of left-hand-side of set statement
33      * @param rhs reference literal of right-hand-side of set statement
34      * @return true if log message should be written, false otherwise
35      */

36     public boolean shouldLogOnNullSet( String JavaDoc lhs, String JavaDoc rhs );
37 }
38
Popular Tags