Class RemoteMethodHelper

java.lang.Object
org.tentackle.persist.wurblet.RemoteMethodHelper

public class RemoteMethodHelper extends Object
Extracts the wurblet tags for a method from a classfile.
Author:
harald
  • Constructor Details

    • RemoteMethodHelper

      public RemoteMethodHelper(RemoteMethodInfo info, String pdoClassName, boolean addThis)
      Loads a class and inspects the method via reflection
      Parameters:
      info - is the RemoteMethodInfo from the last analyze-run
      pdoClassName - if this is a pdo, null if no PDO
      addThis - is true if add 'this' to the remote parameters
  • Method Details

    • getMethodName

      public String getMethodName()
      Returns:
      the method name (not the possibly changed identifier)
    • getReturnType

      public String getReturnType()
      Returns:
      the return type
    • getGenericReturnType

      public String getGenericReturnType()
      Gets the generic return type.
      Returns:
      the type, the empty string if no generics
    • isPdo

      public boolean isPdo()
      Returns:
      true if isPdo methods
    • isReturningVoid

      public boolean isReturningVoid()
      Returns:
      true if method is returning void
    • isReturningObject

      public boolean isReturningObject()
      Returns:
      true if method is returning an object
    • isReturningCollection

      public boolean isReturningCollection()
      Returns:
      true if method is returning a list of db-bjects
    • isReturningCursor

      public boolean isReturningCursor()
      Returns:
      true if method is returning a DbCursor
    • isStaticMethod

      public boolean isStaticMethod()
      Returns:
      true if method is static
    • getFirstName

      public String getFirstName()
      Returns:
      the name of the first parameter
    • isFirstInstanceOfDb

      public boolean isFirstInstanceOfDb()
      Returns:
      true if first parameter is an instance of Db
    • isFirstInstanceOfDomainContext

      public boolean isFirstInstanceOfDomainContext()
      Returns:
      true if first parameter is an instance of DomainContext
    • getParamCount

      public int getParamCount()
      Returns:
      the number of parameters
    • getInvocationParameterString

      public String getInvocationParameterString()
      Returns:
      the invocation parameter string
    • getRemoteInvocationParameterString

      public String getRemoteInvocationParameterString()
      Returns:
      the remote invocation parameter string
    • getDeclarationParameterString

      public String getDeclarationParameterString()
      Returns:
      the invocation parameter string
    • getUpdateDbInParametersStatements

      public List<String> getUpdateDbInParametersStatements()
      Returns:
      the code lines to set the db into the parameters