Árvore de páginas

Versões comparadas

Chave

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

...

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

@annotation AnnotationGetMethodAnnotationList01
teste1 as char
@end

@annotation AnnotationGetMethodAnnotationList02
teste2 as char
@end

Class GetMethodAnnotationList

	Public Method New()

	@AnnotationGetMethodAnnotationList01(teste1 = "Primeira Annotation")
	@AnnotationGetMethodAnnotationList02(teste2 = "Segunda Annotation")
	Public Method MethodWithAnnotation()
EndClass

Method New() class GetMethodAnnotationList
Return Self

Method MethodWithAnnotation() class GetMethodAnnotationList
Return

Function u_testGetMethodAnnotationList(aResult)
	Local aRet

	aRet := Reflection.getMethodAnnotationList("GetMethodAnnotationList", "MethodWithAnnotation")
	Conout(Len(aRet))
	Conout(aRet[1]["teste1"])
	Conout(aRet[2]["teste2"])

Return

Resultado

...

dos Exemplos

2

Primeira Annotation

Segunda Annotation

...