org.apache.asn1.ber.digester.rules
Class ObjectCreateRule

java.lang.Object
  extended by org.apache.asn1.ber.digester.AbstractRule
      extended by org.apache.asn1.ber.digester.rules.ObjectCreateRule
All Implemented Interfaces:
Rule

public class ObjectCreateRule
extends AbstractRule

Rule implementation that creates a new object and pushes it onto the object stack when a TLV is encountered. When the TLV is complete, the object will be popped off of the stack.

Version:
$Rev: 157644 $
Author:
Apache Direclectory Project

Field Summary
private  java.lang.Class clazz
          the class of object to instantiate and push
 
Constructor Summary
ObjectCreateRule(BERDigester digester, java.lang.Class clazz)
          Creates a rule that creates an instance of an object when the tag
 
Method Summary
 void finish()
          Called when the tlv has been completely consumed.
 void tag(int id, boolean isPrimitive, TypeClass typeClass)
          Called when the tag of the matched TLV is encountered.
 
Methods inherited from class org.apache.asn1.ber.digester.AbstractRule
getDigester, length, setDigester, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

private final java.lang.Class clazz
the class of object to instantiate and push

Constructor Detail

ObjectCreateRule

public ObjectCreateRule(BERDigester digester,
                        java.lang.Class clazz)
Creates a rule that creates an instance of an object when the tag

Parameters:
clazz - the class to create an instance of.
Method Detail

tag

public void tag(int id,
                boolean isPrimitive,
                TypeClass typeClass)
Description copied from interface: Rule
Called when the tag of the matched TLV is encountered.

Specified by:
tag in interface Rule
Overrides:
tag in class AbstractRule
Parameters:
id - the tag's id
isPrimitive - whether tlv is primitive or constructed
typeClass - the tag's type class

finish

public void finish()
Description copied from interface: Rule
Called when the tlv has been completely consumed.

Specified by:
finish in interface Rule
Overrides:
finish in class AbstractRule


Copyright © 2004-2009 . All Rights Reserved.