Árvore de páginas

Procura uma Annotation em uma função ADVPL.

Sintaxe

Reflection.isAnnotationFunctionPresent( cSourceName, cFunctionName, cAnnotationName )

Parâmetros

Nome

Tipo

Descrição

Obrigatório

Referência

cSourceName

caractere

Indica o nome do fonte onde está a função que será procurado a Annotation.

X


cPropertyName

caractere

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

X


cAnnotationName
caractereIndica o nome da Annotation que será procurada. X

Retorno

Nome

Tipo

Descrição

lRet

numérico

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

Exemplos

exemplo1.tlpp
@annotation AnnotationExemplo
    nickname as char
@end


@AnnotationExemplo(nickname = "Company")
function exemploAnnotation()
return


main function usoDeAnnotation()
	conout(Reflection.isAnnotationFunctionPresent("exemplo1.tlpp", "exemploAnnotation", "AnnotationExemplo"))
	conout(Reflection.isAnnotationFunctionPresent("exemplo1.tlpp", "exemploAnnotation", "Teste"))
return

Resultado do Exemplo

.T.

.F.

Abrangência

17.3.0.3

Veja também

  • Sem rótulos