KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > orb > NormalParserAction


1 /*
2  * @(#)NormalParserAction.java 1.7 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.orb ;
9
10 import java.util.Properties JavaDoc ;
11
12 import com.sun.corba.se.spi.orb.Operation ;
13
14 public class NormalParserAction extends ParserActionBase {
15     public NormalParserAction( String JavaDoc propertyName,
16     Operation operation, String JavaDoc fieldName )
17     {
18     super( propertyName, false, operation, fieldName ) ;
19     }
20
21     /** Create a String[] of all suffixes of property names that
22      * match the propertyName prefix, pass this to op, and return the
23      * result.
24      */

25     public Object JavaDoc apply( Properties JavaDoc props )
26     {
27     Object JavaDoc value = props.getProperty( getPropertyName() ) ;
28     if (value != null)
29         return getOperation().operate( value ) ;
30     else
31         return null ;
32     }
33 }
34
35
Popular Tags