Package org.bouncycastle.oer
Class Element
java.lang.Object
org.bouncycastle.oer.Element
OER Element is the result of building the OER definition.
-
Constructor Summary
ConstructorDescriptionElement
(OERDefinition.BaseType baseType, List<Element> children, boolean explicit, String label, BigInteger lowerBound, BigInteger upperBound, boolean extensionsInDefinition, BigInteger enumValue, org.bouncycastle.asn1.ASN1Encodable defaultValue, Switch aSwitch, List<org.bouncycastle.asn1.ASN1Encodable> switchValues, ElementSupplier elementSupplier, boolean mayRecurse, String typeName, Map<String, ElementSupplier> supplierMap, int block, int optionals, boolean defaultValuesInChildren) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
static Element
expandDeferredDefinition
(Element e, Element parent) Expands the definition if the element holds an element supplier.int
getBlock()
org.bouncycastle.asn1.ASN1Encodable
getLabel()
int
List
<org.bouncycastle.asn1.ASN1Encodable> boolean
int
hashCode()
boolean
int
Determine the number of integer bytes for a range, ints, signed or unsigned that can fit into 1 to 8 octets use a fixed with encoding.boolean
boolean
boolean
boolean
boolean
boolean
boolean
Return true in cases where the range is all positive (0 ..protected ElementSupplier
resolveSupplier
(String name) toString()
-
Constructor Details
-
Element
public Element(OERDefinition.BaseType baseType, List<Element> children, boolean explicit, String label, BigInteger lowerBound, BigInteger upperBound, boolean extensionsInDefinition, BigInteger enumValue, org.bouncycastle.asn1.ASN1Encodable defaultValue, Switch aSwitch, List<org.bouncycastle.asn1.ASN1Encodable> switchValues, ElementSupplier elementSupplier, boolean mayRecurse, String typeName, Map<String, ElementSupplier> supplierMap, int block, int optionals, boolean defaultValuesInChildren) -
Element
-
-
Method Details
-
expandDeferredDefinition
Expands the definition if the element holds an element supplier.- Parameters:
e
- The element.parent
-- Returns:
- the expanded definition or the passed in element if it has no supplier.
-
rangeExpression
-
appendLabel
-
optionalOrDefaultChildrenInOrder
-
isUnbounded
public boolean isUnbounded() -
isLowerRangeZero
public boolean isLowerRangeZero() -
isUnsignedWithRange
public boolean isUnsignedWithRange()Return true in cases where the range is all positive (0 .. 10)- Returns:
- true if condition met.
-
canBeNegative
public boolean canBeNegative() -
intBytesForRange
public int intBytesForRange()Determine the number of integer bytes for a range, ints, signed or unsigned that can fit into 1 to 8 octets use a fixed with encoding. Returns a negative number if the value is signed and the absolute value is the number of bytes. -
hasPopulatedExtension
public boolean hasPopulatedExtension() -
hasDefaultChildren
public boolean hasDefaultChildren() -
getDefaultValue
public org.bouncycastle.asn1.ASN1Encodable getDefaultValue() -
getFirstChid
-
isFixedLength
public boolean isFixedLength() -
toString
-
getBaseType
-
getChildren
-
isExplicit
public boolean isExplicit() -
getLabel
-
getLowerBound
-
getUpperBound
-
isExtensionsInDefinition
public boolean isExtensionsInDefinition() -
getEnumValue
-
getaSwitch
-
getOptionalChildrenInOrder
-
getValidSwitchValues
-
getElementSupplier
-
isMayRecurse
public boolean isMayRecurse() -
getTypeName
-
getOptionals
public int getOptionals() -
getBlock
public int getBlock() -
getDerivedTypeName
-
resolveSupplier
-
resolveSupplier
-
getParent
-
equals
-
hashCode
public int hashCode()
-