TLPP - LANGUAGE
Abrangência
Versão 17.3.0.0 e superiores
A partir da versão 17.3.0.0 será possível obter o retorno dos métodos e atributos de uma classe sem instanciá-la.
Interface.tlpp
#include "tlpp-object.th"
Class TesteReflection
public method new()
protected method func1()
private method func2()
public data data1
private data data2
protected data data3
EndClass
method new() class TesteReflection
Return self
method func1() class TesteReflection
Return self
method func2() class TesteReflection
Return self
Function u_test_getClass
local retMethods := TesteReflection():TGetMethods()
local retData := TesteReflection():TGetData()
conout("### methods:")
conout(retMethods[1])
conout(retMethods[2])
conout(retMethods[3])
conout("### data:")
conout(retData[1])
conout(retData[2])
conout(retData[3])
Return
Resultado:
### methods:
FUNC1
FUNC2
NEW
### data:
DATA1
DATA2
DATA3
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas