Class ConstraintParser

java.lang.Object
org.spongepowered.asm.util.ConstraintParser

public final class ConstraintParser extends Object
Parser for constraints
  • Method Details

    • parse

      public static ConstraintParser.Constraint parse(String expr)
      Parse the supplied expression as a constraint and returns a new Constraint. Returns ConstraintParser.Constraint.NONE if the constraint could not be parsed or is empty.
      Parameters:
      expr - constraint expression to parse
      Returns:
      parsed constraint
    • parse

      public static ConstraintParser.Constraint parse(org.objectweb.asm.tree.AnnotationNode annotation)
      Parse a constraint expression on the supplied annotation as a constraint and returns a new Constraint. Returns ConstraintParser.Constraint.NONE if the constraint could not be parsed or is empty.
      Parameters:
      annotation - annotation containing the constraint expression to parse
      Returns:
      parsed constraint