Package org.tentackle.persist.wurblet
Class RemoteMethodHelper
- java.lang.Object
-
- org.tentackle.persist.wurblet.RemoteMethodHelper
-
public class RemoteMethodHelper extends java.lang.ObjectExtracts the wurblet tags for a method from a classfile.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description RemoteMethodHelper(org.tentackle.buildsupport.RemoteMethodInfo info, java.lang.String pdoClassName, boolean addThis)Loads a class and inspects the method via reflection
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDeclarationParameterString()java.lang.StringgetFirstName()java.lang.StringgetGenericReturnType()Gets the generic return type.java.lang.StringgetInvocationParameterString()java.lang.StringgetMethodName()intgetParamCount()java.lang.StringgetRemoteInvocationParameterString()java.lang.StringgetReturnType()java.util.List<java.lang.String>getUpdateDbInParametersStatements()booleanisFirstInstanceOfDb()booleanisFirstInstanceOfDomainContext()booleanisPdo()booleanisReturningCollection()booleanisReturningCursor()booleanisReturningObject()booleanisReturningVoid()booleanisStaticMethod()
-
-
-
Constructor Detail
-
RemoteMethodHelper
public RemoteMethodHelper(org.tentackle.buildsupport.RemoteMethodInfo info, java.lang.String pdoClassName, boolean addThis)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 Detail
-
getMethodName
public java.lang.String getMethodName()
- Returns:
- the method name (not the possibly changed identifier)
-
getReturnType
public java.lang.String getReturnType()
- Returns:
- the return type
-
getGenericReturnType
public java.lang.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 java.lang.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 java.lang.String getInvocationParameterString()
- Returns:
- the invocation parameter string
-
getRemoteInvocationParameterString
public java.lang.String getRemoteInvocationParameterString()
- Returns:
- the remote invocation parameter string
-
getDeclarationParameterString
public java.lang.String getDeclarationParameterString()
- Returns:
- the invocation parameter string
-
getUpdateDbInParametersStatements
public java.util.List<java.lang.String> getUpdateDbInParametersStatements()
- Returns:
- the code lines to set the db into the parameters
-
-