Enum MMMethodKind

java.lang.Object
java.lang.Enum<MMMethodKind>
spoon.metamodel.MMMethodKind
All Implemented Interfaces:
Serializable, Comparable<MMMethodKind>

public enum MMMethodKind extends Enum<MMMethodKind>
Represents the type of metamodel method. eg CtType.addField(CtField) has MMMethodKindADD_FIRST.
  • Enum Constant Details

    • GET

      public static final MMMethodKind GET
      Getter. T get()
    • SET

      public static final MMMethodKind SET
      Setter void set(T)
    • ADD_FIRST

      public static final MMMethodKind ADD_FIRST
      void addFirst(T)
    • ADD_LAST

      public static final MMMethodKind ADD_LAST
      void add(T)
    • ADD_ON

      public static final MMMethodKind ADD_ON
      void addOn(int, T)
    • REMOVE

      public static final MMMethodKind REMOVE
      void remove(T)
    • GET_BY

      public static final MMMethodKind GET_BY
      Return element by its name T get(String)
    • OTHER

      public static final MMMethodKind OTHER
      The not matching method
  • Method Details

    • values

      public static MMMethodKind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MMMethodKind valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isMulti

      public boolean isMulti()
      Returns:
      true if this accessor provides access to elements of a collection. false if it accessed full value of attribute
    • kindOf

      public static MMMethodKind kindOf(CtMethod<?> method)
      Detect kind of method
      Parameters:
      method - to be check method
      Returns:
      detected MMMethodKind, which fits to the `method`