Package org.tentackle.persist.wurblet
Class RemoteMethodHelper
java.lang.Object
org.tentackle.persist.wurblet.RemoteMethodHelper
Extracts the wurblet tags for a method from a classfile.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteMethodHelper(RemoteMethodInfo info, String pdoClassName, boolean addThis) Loads a class and inspects the method via reflection -
Method Summary
Modifier and TypeMethodDescriptionGets the generic return type.intbooleanbooleanbooleanisPdo()booleanbooleanbooleanbooleanboolean
-
Constructor Details
-
RemoteMethodHelper
Loads a class and inspects the method via reflection- Parameters:
info- is the RemoteMethodInfo from the last analyze-runpdoClassName- if this is a pdo, null if no PDOaddThis- is true if add 'this' to the remote parameters
-
-
Method Details
-
getMethodName
- Returns:
- the method name (not the possibly changed identifier)
-
getReturnType
- Returns:
- the return type
-
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
- 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
- Returns:
- the invocation parameter string
-
getRemoteInvocationParameterString
- Returns:
- the remote invocation parameter string
-
getDeclarationParameterString
- Returns:
- the invocation parameter string
-
getUpdateDbInParametersStatements
- Returns:
- the code lines to set the db into the parameters
-