Class MethodGetter

java.lang.Object
me.ahoo.cosid.accessor.method.MethodGetter
All Implemented Interfaces:
CosIdGetter

public class MethodGetter extends Object implements CosIdGetter
ID getter that accesses via getter method.
  • Constructor Details

    • MethodGetter

      public MethodGetter(Method getter)
      Creates a getter for the specified method.
      Parameters:
      getter - the getter method
  • Method Details

    • getGetter

      public Method getGetter()
      Gets the getter method.
      Returns:
      the getter method
    • getId

      public Object getId(Object target)
      Description copied from interface: CosIdGetter
      Gets the ID value from the target object.
      Specified by:
      getId in interface CosIdGetter
      Parameters:
      target - the object to get ID from
      Returns:
      the ID value