Histórico da Página
...
Pagetitle | ||||
---|---|---|---|---|
|
Procura Efetua a busca de uma Annotation em uma propriedade de um objeto.
...
Nome | Tipo | Descrição | Obrigatório | Referência |
---|---|---|---|---|
oObj | objeto | Indica o objeto Objeto onde será procurado a Annotation. | X | |
cPropertyName | caractere | Indica o nome Nome da propriedade onde será procurada a Annotation. | X | |
cAnnotationName | caractere | Indica o nome Nome da Annotation que será procurada. | X |
Retorno
Nome | Tipo | Descrição |
---|---|---|
lRet | lógico | Retorna .T. caso encontre a Annotation e .F. caso não encontre. |
Exemplos
Bloco de código | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#include "tlpp-core.th" @annotation AnnotationExemploAnnotationIsAnnotationDataPresent nickname as char @end Class IsAnnotationDataPresent class MeuObjeto @AnnotationExemplo@AnnotationIsAnnotationDataPresent(nickname = "CompanyTotvs") publicPublic data data1 publicPublic methodMethod newNew() EndClass main function usoDeAnnotationMethod New() class IsAnnotationDataPresent Return Self Function u_testIsAnnotationDataPresent() localLocal oObj := MeuObjetoIsAnnotationDataPresent():New() conoutConout(Reflection.isAnnotationDataPresent(oObj, "data1", "AnnotationExemploAnnotationIsAnnotationDataPresent")) conoutConout(Reflection.isAnnotationDataPresent(oObj, "data1", "TesteNoExist")) returnReturn |
Resultado do Exemplo
.T.
.F.
...
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas