1 7 8 package com.sun.corba.se.impl.orb ; 9 10 import java.util.Properties ; 11 12 import com.sun.corba.se.spi.orb.Operation ; 13 14 public abstract class ParserActionBase implements ParserAction { 15 private String propertyName ; 16 private boolean prefix ; 17 private Operation operation ; 18 private String fieldName ; 19 20 public int hashCode() 21 { 22 return propertyName.hashCode() ^ operation.hashCode() ^ 23 fieldName.hashCode() ^ (prefix ? 0 : 1) ; 24 } 25 26 public boolean equals( Object obj ) 27 { 28 if (obj == this) 29 return true ; 30 31 if (!(obj instanceof ParserActionBase)) 32 return false ; 33 34 ParserActionBase other = (ParserActionBase)obj ; 35 36 return propertyName.equals( other.propertyName ) && 37 prefix == other.prefix && 38 operation.equals( other.operation ) && 39 fieldName.equals( other.fieldName ) ; 40 } 41 42 public ParserActionBase( String propertyName, boolean prefix, 43 Operation operation, String fieldName ) 44 { 45 this.propertyName = propertyName ; 46 this.prefix = prefix ; 47 this.operation = operation ; 48 this.fieldName = fieldName ; 49 } 50 51 public String getPropertyName() 52 { 53 return propertyName ; 54 } 55 56 public boolean isPrefix() 57 { 58 return prefix ; 59 } 60 61 public String getFieldName() 62 { 63 return fieldName ; 64 } 65 66 public abstract Object apply( Properties props ) ; 67 68 protected Operation getOperation() 69 { 70 return operation ; 71 } 72 } 73 74 | Popular Tags |