Á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
titleexemplo1test_doc_resourceGetFunctionAnnotation.tlpp
linenumberstrue
@annotation AnnotationExemplo
    /*
Programa test_doc_resourceGetFunctionAnnotation.tlpp
*/

#include "tlpp-core.th"

@annotation AnnotationResource
nickname as char
@end
 
 
@AnnotationExemplo@AnnotationResource(nickname = "Company"='Totvs')
functionFunction exemploAnnotationu_resourceGetFunctionAnnotation()
return
Bloco de código
languagecpp
themeEclipse
titletest_doc_getFunctionAnnotation.tlpp
linenumberstrue
#include "tlpp-core.th"

Function u_testGetFunctionAnnotation
 
 
main function usoDeAnnotation()
	local oObjjRet
	jRet := MeuObjeto():New()
	local jRet
	if (Reflection.isAnnotationFunctionPresentgetFunctionAnnotation("exemplo1test_doc_resourceGetFunctionAnnotation.tlpp", "exemploAnnotationu_resourceGetFunctionAnnotation", "AnnotationExemploAnnotationResource"))

		if(valType(jRet) := Reflection.getFunctionAnnotation("exemplo1.tlpp", "exemploAnnotation","AnnotationExemplo<> "U")
		conout(jRet["NICKNAMEnickname"])
	else
		conout('Não foram encontradas Annotations com os parametros pesquisados')
	endif

return

Resultado do Exemplo

CompanyTotvs

Abrangência

17.3.0.3

Veja também

...