public class Legacy4GLMethod extends BaseObject
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Parameter> |
_parameters |
private LegacySignature |
ablSignature |
private object<? extends LegacyClass> |
declaringClass |
private InternalEntry |
ie |
private logical |
isOverride |
private LegacyClass |
originatingClass |
private object<? extends DataType> |
returnType |
private java.lang.String |
txtSig |
| Constructor and Description |
|---|
Legacy4GLMethod(LegacyClass cls,
InternalEntry internalEntry)
Create a new legacy class object.
|
Legacy4GLMethod(LegacyClass cls,
java.lang.reflect.Method javaMethod)
Create a new legacy class object.
|
| Modifier and Type | Method and Description |
|---|---|
private java.util.List<Parameter> |
_getParameters()
Build the list of method parameters (lazy load).
|
private LegacySignature |
_getSignature()
Get the LegacySignature of current method.
|
private static LegacySignature |
_getSignature(java.lang.reflect.Method javaMethod)
Get the LegacySignature annotation for the Java method.
|
private BaseDataType |
_invoke(object<? extends ParameterList> _params,
java.lang.Object _instance)
Invoke the current method.
|
object<? extends AccessMode> |
getAccessMode() |
object<? extends LegacyClass> |
getDeclaringClass() |
logical |
getIsAbstract() |
logical |
getIsFinal() |
logical |
getIsOverride() |
logical |
getIsStatic() |
character |
getName() |
integer |
getNumParameters() |
object<? extends LegacyClass> |
getOriginatingClass() |
object<? extends Parameter>[] |
getParameters() |
integer |
getReturnExtent() |
object<? extends DataType> |
getReturnType() |
character |
getReturnTypeName() |
BaseDataType |
invoke(object<? extends _BaseObject_> _instance,
object<? extends ParameterList> _params) |
BaseDataType |
invoke(object<? extends ParameterList> _params) |
static boolean |
is4GLMethod(java.lang.reflect.Method javaMethod)
Check if the method has a valid LegacySignature (type is method).
|
static boolean |
is4GLMethod(java.lang.reflect.Method javaMethod,
Flags flags)
Check if the method has a valid LegacySignature (type is method)
and conforms to the specific flag selection criteria.
|
private boolean |
isOverride(java.lang.reflect.Method javaMethod,
java.lang.Class<?> javaClass)
Check if the given method is an override for a method defined in it's super class(es).
|
boolean |
isTracked()
Reports if the given instance is managed as part of the legacy 4GL object life cycle.
|
character |
toLegacyString()
Get the string representation for this instance.
|
java.lang.String |
toString() |
__isValidInternal__, __lang_BaseObject_constructor__, __setValidInternal__, assertNotNull, assertNotNull, getLegacyClass, getNextSibling, getPrevSibling, legacyClone, legacyEqualsprivate final LegacyClass originatingClass
private final InternalEntry ie
private LegacySignature ablSignature
private java.lang.String txtSig
private object<? extends LegacyClass> declaringClass
private logical isOverride
private java.util.List<Parameter> _parameters
public Legacy4GLMethod(LegacyClass cls, java.lang.reflect.Method javaMethod)
cls - The originating legacy class.javaMethod - The method (reflection).public Legacy4GLMethod(LegacyClass cls, InternalEntry internalEntry)
cls - The originating legacy class.internalEntry - The InternalEntry.public static boolean is4GLMethod(java.lang.reflect.Method javaMethod)
javaMethod - the java methodtrue if the method has a valid signaturepublic static boolean is4GLMethod(java.lang.reflect.Method javaMethod,
Flags flags)
javaMethod - the java methodflags - the Flags enum to use as selection criteriatrue if the method has a valid signature for the input flagspublic object<? extends AccessMode> getAccessMode()
public object<? extends LegacyClass> getDeclaringClass()
public logical getIsAbstract()
public logical getIsFinal()
public logical getIsOverride()
public logical getIsStatic()
public character getName()
public integer getNumParameters()
public object<? extends LegacyClass> getOriginatingClass()
public integer getReturnExtent()
public character getReturnTypeName()
public BaseDataType invoke(object<? extends ParameterList> _params)
public BaseDataType invoke(object<? extends _BaseObject_> _instance, object<? extends ParameterList> _params)
public character toLegacyString()
BaseObject
Although the original method name is toString(), this version returns a
character type which would conflict with the java.lang.Object.toString()
version. For this reason, the name is mapped differently during conversion.
toLegacyString in interface _BaseObject_toLegacyString in class BaseObjectpublic boolean isTracked()
false for 4GL internals (class/reflection).public java.lang.String toString()
toString in class java.lang.Objectprivate java.util.List<Parameter> _getParameters()
private LegacySignature _getSignature()
private static LegacySignature _getSignature(java.lang.reflect.Method javaMethod)
javaMethod - The method.private boolean isOverride(java.lang.reflect.Method javaMethod,
java.lang.Class<?> javaClass)
javaMethod - The method.javaClass - The super class to start searching from.private BaseDataType _invoke(object<? extends ParameterList> _params, java.lang.Object _instance)
_params - The parameter list._instance - The object instance or the originating class for static method.