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. package com.sun.corba.se.impl.orb ;
  8. import java.util.Properties ;
  9. import com.sun.corba.se.spi.orb.Operation ;
  10. public class NormalParserAction extends ParserActionBase {
  11. public NormalParserAction( String propertyName,
  12. Operation operation, String fieldName )
  13. {
  14. super( propertyName, false, operation, fieldName ) ;
  15. }
  16. /** Create a String[] of all suffixes of property names that
  17. * match the propertyName prefix, pass this to op, and return the
  18. * result.
  19. */
  20. public Object apply( Properties props )
  21. {
  22. Object value = props.getProperty( getPropertyName() ) ;
  23. if (value != null)
  24. return getOperation().operate( value ) ;
  25. else
  26. return null ;
  27. }
  28. }