com.perforce.p4java.impl.mapbased.rpc.packet.helper
Class RpcPacketFieldPatternRule

java.lang.Object
  extended by com.perforce.p4java.impl.mapbased.rpc.packet.helper.RpcPacketFieldRule
      extended by com.perforce.p4java.impl.mapbased.rpc.packet.helper.RpcPacketFieldPatternRule

public class RpcPacketFieldPatternRule
extends RpcPacketFieldRule

Defines the rule for pattern matching the field names.


Field Summary
protected  Pattern fieldPattern
          The regex pattern for matching fields which the field values (bytes) will not be converted to strings.
 
Fields inherited from class com.perforce.p4java.impl.mapbased.rpc.packet.helper.RpcPacketFieldRule
FIELD_PATTERN, skipConversion, START_FIELD, STOP_FIELD
 
Constructor Summary
RpcPacketFieldPatternRule(String fieldRegex)
          Constructor for creating a field pattern rule.
 
Method Summary
 Pattern getFieldPattern()
          Gets the field pattern.
 void update(String fieldName)
          Updates the conversion rule.
 
Methods inherited from class com.perforce.p4java.impl.mapbased.rpc.packet.helper.RpcPacketFieldRule
getInstance, isSkipConversion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldPattern

protected Pattern fieldPattern
The regex pattern for matching fields which the field values (bytes) will not be converted to strings.

Pattern object to be compiled with the passed-in field pattern parameter. It is reusable and thus better performance overall.

Constructor Detail

RpcPacketFieldPatternRule

public RpcPacketFieldPatternRule(String fieldRegex)
Constructor for creating a field pattern rule.

Parameters:
fieldRegex - the field regex, not null
Method Detail

update

public void update(String fieldName)
Updates the conversion rule.

Specified by:
update in class RpcPacketFieldRule
Parameters:
fieldName - the field name

getFieldPattern

public Pattern getFieldPattern()
Gets the field pattern.

Returns:
the field pattern


Copyright © 2015 Perforce Software. All Rights Reserved.