Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Nome

Tipo

Descrição

Obrigatório

Referência

xParam**

objeto/caractere** 

Objeto instância da classe/nome da classe** onde será procurado/a a Annotation.

X


cMethodName
caractereNome do método onde será procurada a Annotation.           X
cAnnotationName 

caractere

Nome da Annotation que será procurada.

X


...

Bloco de código
languagecpp
themeEclipse
titleexemplo2.tlpp
linenumberstrue
#include "tlpp-core.th"

@annotation AnnotationGetMethodAnnotation
nickname as char
@end

Class GetMethodAnnotation

	Public Method New()

	@AnnotationGetMethodAnnotation(nickname = "Totvs")
	Public Method MethodWithAnnotation()
EndClass

Method New() class GetMethodAnnotation
Return Self

Method MethodWithAnnotation() class GetMethodAnnotation
Return

Function u_testGetMethodAnnotation()
	Local jRet
	
    jRet := Reflection.getMethodAnnotation("GetMethodAnnotation", "MethodWithAnnotation", "AnnotationGetMethodAnnotation")  
	If (valType(jRet) <> 'U')
		Conout(jRet["nickname"])
	EndIf

Return

Resultado do Exemplo

CompanyTotvs

Abrangência

17.3.0.3

Veja também

...