Class MethodCallInfo

java.lang.Object
com.jk.core.reflection.common.MethodCallInfo
All Implemented Interfaces:
Serializable

public class MethodCallInfo extends Object implements Serializable
This class represents information about a method call, including class name, method name, parameters, result, and any associated exceptions.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
See Also:
  • Constructor Details

    • MethodCallInfo

      public MethodCallInfo()
      This method constructs a new MethodCallInfo.
    • MethodCallInfo

      public MethodCallInfo(String className, String methodName, Object... paramters)
      This method constructs a new MethodCallInfo with the specified class name, method name and parameters.
      Parameters:
      className - Specifies the method class name.
      methodName - Specifies the method name.
      paramters - Specifies the method parameters.
  • Method Details

    • getClassName

      public String getClassName()
      This method gets the method class name.
      Returns:
      the method class name.
    • getException

      public Exception getException()
      This method get the method exception.
      Returns:
      the method exception.
    • getMethodName

      public String getMethodName()
      This method gets the method name.
      Returns:
      the method name.
    • getParamters

      public Object[] getParamters()
      This method gets the parameters being passed to the method.
      Returns:
      the parameters array.
    • getParamtersTypes

      public Class[] getParamtersTypes()
      This method gets the parameter types as an array of Class objects.
      Returns:
      an array of parameter types.
    • getResult

      public Object getResult()
      This method gets the result of the method call.
      Returns:
      the result of the method call.
    • isFailed

      public boolean isFailed()
      This method checks whether the method call failed or not.
      Returns:
      true, if it did fail, false otherwise.
    • set

      public void set(MethodCallInfo another)
      This method sets the values of this MethodCallInfo from another instance.
      Parameters:
      another - Specifies the other instance to copy values from.
    • setClassName

      public void setClassName(String className)
      This method sets the class name to the specified value.
      Parameters:
      className - Specifies the new class name.
    • setException

      public void setException(Exception e)
      This method sets the method call exception to the specified exception.
      Parameters:
      e - Specifies the new exception.
    • setFailed

      public void setFailed(boolean failed)
      This method sets the failure status of the method call.
      Parameters:
      failed - Indicates whether the method failed or not.
    • setMethodName

      public void setMethodName(String methodName)
      This method sets the method name.
      Parameters:
      methodName - Specifies the new method name.
    • setParamters

      public void setParamters(Object... param)
      This method sets the parameters being passed to the method call.
      Parameters:
      param - Speciifes the new parameters.
    • setResult

      public void setResult(Object result)
      This method sets the result of the method call.
      Parameters:
      result - Specifies the new result of the method call.
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.