private void addObject(Asn1Object current)
{
if (filterStack == null)
{
filterStack = new System.Collections.Stack();
}
if (choiceValue() == null)
{
//ChoiceValue is the root Asn1 node
ChoiceValue = current;
}
else
{
Asn1Tagged topOfStack = (Asn1Tagged) filterStack.Peek();
Asn1Object value_Renamed = topOfStack.taggedValue();
if (value_Renamed == null)
{
topOfStack.TaggedValue = current;
filterStack.Push(current);
// filterStack.Add(current);
}
else if (value_Renamed is Asn1SetOf)
{
((Asn1SetOf) value_Renamed).add(current);
//don't add this to the stack:
}
else if (value_Renamed is Asn1Set)
{
((Asn1Set) value_Renamed).add(current);
//don't add this to the stack:
}
else if (value_Renamed.getIdentifier().Tag == LdapSearchRequest.NOT)
{
throw new LdapLocalException("Attemp to create more than one 'not' sub-filter", LdapException.FILTER_ERROR);
}
}
int type = current.getIdentifier().Tag;
if (type == AND || type == OR || type == NOT)
{
// filterStack.Add(current);
filterStack.Push(current);
}
return ;
}