Class JMod

java.lang.Object
org.jboss.jdeparser.JMod

public final class JMod extends Object
The set of modifiers for types and members.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The abstract modifier.
    static final int
    The default modifier found in Java 8 and later.
    static final int
    The final modifier.
    static final int
    The native modifier.
    static final int
    The private modifier.
    static final int
    The protected modifier.
    static final int
    The public modifier.
    static final int
    The static modifier.
    static final int
    The strictfp modifier.
    static final int
    The synchronized modifier.
    static final int
    The transient modifier.
    static final int
    The volatile modifier.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    allAreClear(int set, int test)
    Test to see if all modifiers in the given set are absent in the test value.
    static boolean
    allAreSet(int set, int test)
    Test to see if all modifiers in the given set are present in the test value.
    static boolean
    anyAreClear(int set, int test)
    Test to see if any of the modifiers in the given set are absent in the test value.
    static boolean
    anyAreSet(int set, int test)
    Test to see if any of the modifiers in the given set are present in the test value.
    static int
    of(Element element)
    Returns an integer which results in the appropriate modifier based on the element.
    static boolean
    oneIsSet(int set, int test)
    Test to see if exactly one modifier of the given set is present in the test value.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • JMod

      public JMod()
  • Method Details

    • oneIsSet

      public static boolean oneIsSet(int set, int test)
      Test to see if exactly one modifier of the given set is present in the test value.
      Parameters:
      set - the set of modifiers to test against
      test - the modifier set to test
      Returns:
      true if exactly one of set is present in test, false otherwise
    • allAreSet

      public static boolean allAreSet(int set, int test)
      Test to see if all modifiers in the given set are present in the test value.
      Parameters:
      set - the set of modifiers to test against
      test - the modifier set to test
      Returns:
      true if all the modifiers in set are present in test, false otherwise
    • allAreClear

      public static boolean allAreClear(int set, int test)
      Test to see if all modifiers in the given set are absent in the test value.
      Parameters:
      set - the set of modifiers to test against
      test - the modifier set to test
      Returns:
      true if all the modifiers in set are absent in test, false otherwise
    • anyAreSet

      public static boolean anyAreSet(int set, int test)
      Test to see if any of the modifiers in the given set are present in the test value.
      Parameters:
      set - the set of modifiers to test against
      test - the modifier set to test
      Returns:
      true if any of the modifiers in set are present in test, false otherwise
    • anyAreClear

      public static boolean anyAreClear(int set, int test)
      Test to see if any of the modifiers in the given set are absent in the test value.
      Parameters:
      set - the set of modifiers to test against
      test - the modifier set to test
      Returns:
      true if any of the modifiers in set are absent in test, false otherwise
    • of

      public static int of(Element element)
      Returns an integer which results in the appropriate modifier based on the element.
      Parameters:
      element - the element to check the modifiers on
      Returns:
      an integer representing the modifiers