Efetua a busca de uma Annotation em um objeto.
Sintaxe
Reflection.isAnnotationObjectPresent( oObj, cAnnotationName )
Parâmetros
Nome | Tipo | Descrição | Obrigatório | Referência |
---|---|---|---|---|
oObj | objeto | Objeto onde será procurado a Annotation. | X | |
cAnnotationName | caractere | Nome da Annotation que será procurada. | X |
Retorno
Nome | Tipo | Descrição |
---|---|---|
lRet | logico | Retorna .T. caso encontre a Annotation no objeto passado e .F. caso não encontre. |
Exemplos
test_doc_IsAnnotationObjectPresent.tlpp
#include "tlpp-core.th" @annotation AnnotationIsAnnotationObjectPresent nickname as char @end @AnnotationIsAnnotationObjectPresent(nickname = "Company") Class IsAnnotationObjectPresent Public Method New() EndClass Method New() class IsAnnotationObjectPresent Return Self Function u_testIsAnnotationObjectPresent(aResult) Local oObj := IsAnnotationObjectPresent():New() Conout(Reflection.isAnnotationObjectPresent(oObj, "AnnotationIsAnnotationObjectPresent")) Conout(Reflection.isAnnotationObjectPresent(oObj, "NoExist")) Return
Resultado do Exemplo
.T.
.F.
Abrangência
17.3.0.3
Veja também
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas