Class Args

java.lang.Object
org.apache.bcel.util.Args

public class Args extends Object
Argument validation.
Since:
6.7.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    require(int value, int required, String message)
    Requires a specific value.
    static int
    require0(int value, String message)
    Requires a 0 value.
    static int
    requireU1(int value, String message)
    Requires a u1 value.
    static int
    requireU2(int value, int min, int max, String message)
    Requires a u2 value of at least min and not above max.
    static int
    requireU2(int value, int min, String message)
    Requires a u2 value of at least min.
    static int
    requireU2(int value, String message)
    Requires a u2 value.
    static int
    requireU4(int value, int min, String message)
    Requires a u4 value of at least min.
    static int
    requireU4(int value, String message)
    Requires a u4 value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Args

      public Args()
  • Method Details

    • require

      public static int require(int value, int required, String message)
      Requires a specific value.
      Parameters:
      value - The value to test.
      required - The required value.
      message - The message prefix
      Returns:
      The value to test.
    • require0

      public static int require0(int value, String message)
      Requires a 0 value.
      Parameters:
      value - The value to test.
      message - The message prefix
      Returns:
      The value to test.
    • requireU1

      public static int requireU1(int value, String message)
      Requires a u1 value.
      Parameters:
      value - The value to test.
      message - The message prefix
      Returns:
      The value to test.
    • requireU2

      public static int requireU2(int value, int min, int max, String message)
      Requires a u2 value of at least min and not above max.
      Parameters:
      value - The value to test.
      min - The minimum required u2 value.
      max - The maximum required u2 value.
      message - The message prefix
      Returns:
      The value to test.
    • requireU2

      public static int requireU2(int value, int min, String message)
      Requires a u2 value of at least min.
      Parameters:
      value - The value to test.
      min - The minimum required value.
      message - The message prefix
      Returns:
      The value to test.
    • requireU2

      public static int requireU2(int value, String message)
      Requires a u2 value.
      Parameters:
      value - The value to test.
      message - The message prefix
      Returns:
      The value to test.
    • requireU4

      public static int requireU4(int value, int min, String message)
      Requires a u4 value of at least min.
      Parameters:
      value - The value to test.
      min - The minimum required value.
      message - The message prefix
      Returns:
      The value to test.
    • requireU4

      public static int requireU4(int value, String message)
      Requires a u4 value.
      Parameters:
      value - The value to test.
      message - The message prefix
      Returns:
      The value to test.