Histórico da Página
...
Bloco de código | ||
---|---|---|
| ||
Reflection.isAnnotationObjectPresent( oObjxParam, cAnnotationName ) |
Parâmetros
Nome | Tipo | Descrição | Obrigatório | Referência |
---|---|---|---|---|
oObjxParam | objeto/caracter** | Objeto instância da classe/nome da classe** onde será procurado/a a Annotation. | X | |
cAnnotationName | caractere | Nome da Annotation que será procurada. | X |
Informações | ||
---|---|---|
| ||
A partir do build 24.3.0.0, também haverá a opção de passar simplesmente o nome da classe em xParam, conforme exemplo 2. Mas continua valendo a passagem da instância do objeto (exemplo 1). |
Retorno
Nome | Tipo | Descrição |
---|---|---|
lRet | logico | Retorna .T. caso encontre a Annotation no objeto passado e .F. caso não encontre. |
...
Bloco de código | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#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 |
Bloco de código | |||||
---|---|---|---|---|---|
|
...
| |||
#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)
Conout(Reflection.isAnnotationObjectPresent("IsAnnotationObjectPresent", "AnnotationIsAnnotationObjectPresent"))
Conout(Reflection.isAnnotationObjectPresent("IsAnnotationObjectPresent", "NoExist"))
Return |
Resultado dos Exemplos
.T.
.F.
Abrangência
17.3.0.3
...
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas