Class Element

java.lang.Object
org.bouncycastle.oer.Element

public class Element extends Object
OER Element is the result of building the OER definition.
  • Constructor Details

  • Method Details

    • expandDeferredDefinition

      public static Element expandDeferredDefinition(Element e, Element parent)
      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

      public String rangeExpression()
    • appendLabel

      public String appendLabel(String s)
    • optionalOrDefaultChildrenInOrder

      public List<Element> 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

      public Element getFirstChid()
    • isFixedLength

      public boolean isFixedLength()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBaseType

      public OERDefinition.BaseType getBaseType()
    • getChildren

      public List<Element> getChildren()
    • isExplicit

      public boolean isExplicit()
    • getLabel

      public String getLabel()
    • getLowerBound

      public BigInteger getLowerBound()
    • getUpperBound

      public BigInteger getUpperBound()
    • isExtensionsInDefinition

      public boolean isExtensionsInDefinition()
    • getEnumValue

      public BigInteger getEnumValue()
    • getaSwitch

      public Switch getaSwitch()
    • getOptionalChildrenInOrder

      public List<Element> getOptionalChildrenInOrder()
    • getValidSwitchValues

      public List<org.bouncycastle.asn1.ASN1Encodable> getValidSwitchValues()
    • getElementSupplier

      public ElementSupplier getElementSupplier()
    • isMayRecurse

      public boolean isMayRecurse()
    • getTypeName

      public String getTypeName()
    • getOptionals

      public int getOptionals()
    • getBlock

      public int getBlock()
    • getDerivedTypeName

      public String getDerivedTypeName()
    • resolveSupplier

      public ElementSupplier resolveSupplier()
    • resolveSupplier

      protected ElementSupplier resolveSupplier(String name)
    • getParent

      public Element getParent()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object