Class ContainedConstraint

java.lang.Object
com.oss.metadata.Constraints
com.oss.metadata.ContainedConstraint

public class ContainedConstraint extends Constraints
The ContainedConstraint class represents the ASN.1 contained constraint. This constraint is used where the constraint is a reference to another type. In the following example:
    A ::= PrintableString (FROM ("A" | "B" | "C"))
    B ::= PrintableString (SIZE(1 | 3 ))
    C ::= PrintableString (A ^ B)
    
the constraints of C are two ContainedConstraints, A and B.
Since:
ASN.1/Java 2.1
  • Method Details

    • getTypeInfo

      public TypeInfo getTypeInfo() throws MetadataException
      Return the metadata for the type that is constraining this type.
      Returns:
      TypeInfo of the constraining type
      Throws:
      MetadataException - if attempt to resolve the weak reference fails: class could not be found or typeInfo was not available.
    • getTypeInfo

      public TypeInfo getTypeInfo(Object context) throws MetadataException
      Return the metadata for the type that is constraining this type.
      Parameters:
      context - project environment
      Returns:
      TypeInfo of the constraining type
      Throws:
      MetadataException - if attempt to resolve the weak reference fails: class could not be found or typeInfo was not available.