Árvore de páginas

Efetua a busca de uma Annotation em uma função de um determinado programa fonte.

Sintaxe

Reflection.isAnnotationFunctionPresent( cSourceName, cFunctionName, cAnnotationName )

Parâmetros

Nome

Tipo

Descrição

Obrigatório

Referência

cSourceName

caractere

Nome do fonte contendo a função onde será procurada a Annotation.

X


cPropertyName

caractere

Nome da função onde será procurada a Annotation.

X


cAnnotationName
caractereNome da Annotation a ser procurada. X

Retorno

Nome

Tipo

Descrição

lRet

logico

Retorna .T. caso encontre a Annotation e .F. caso não encontre.

Exemplos

test_doc_resourceIsAnnotationFunctionPresent
/*
Programa test_doc_resourceIsAnnotationFunctionPresent.tlpp
*/

#include "tlpp-core.th"

@annotation AnnotationExemplo
resourceExemplo as char
@end

@AnnotationExemplo(resourceExemplo='Valor de Exemplo1')
function u_resourceIsAnnotationFunctionPresent()
return
test_doc_IsAnnotationFunctionPresent.tlpp
#include "tlpp-core.th"

Function u_testIsAnnotationFunctionPresent()

	Conout(Reflection.isAnnotationFunctionPresent('test_doc_resourceIsAnnotationFunctionPresent.tlpp', "u_resourceIsAnnotationFunctionPresent", "AnnotationExemplo"))
	Conout(Reflection.isAnnotationFunctionPresent('test_doc_resourceIsAnnotationFunctionPresent.tlpp', "u_resourceIsAnnotationFunctionPresent", "AnotherAnnotationExemplo"))
Return

Resultado do Exemplo

.T.

.F.

Abrangência

17.3.0.3

Veja também

  • Sem rótulos