import.css=/download/attachments/6062824/tecnologia.css |
Efetua a busca de uma Annotation em uma método de um objeto.
Reflection.isAnnotationMethodPresent( xParam, cMethodName, cAnnotationName ) |
Nome | Tipo | Descrição | Obrigatório | Referência |
---|---|---|---|---|
xParam | objeto/caractere** | Objeto instância da classe/nome da classe** proprietário/a do método onde será procurada a Annotation. | X | |
cMethodName | caractere | Nome do método onde será procurada a Annotation. | X | |
cAnnotationName | caractere | Nome da Annotation que será procurada. | X |
Nome | Tipo | Descrição |
---|---|---|
lRet | logico | Retorna .T. caso encontre a Annotation e .F. caso não encontre. |
#include "tlpp-core.th" @annotation AnnotationIsAnnotationMethodPresent nickname as char @end Class IsAnnotationMethodPresent Public Method New() @AnnotationIsAnnotationMethodPresent(nickname = "Company") Public Method MethodWithAnnotation() EndClass Method New() class IsAnnotationMethodPresent Return Self Method MethodWithAnnotation() class IsAnnotationMethodPresent Return Function u_testIsAnnotationMethodPresent() Local oObj := IsAnnotationMethodPresent():New() Conout(Reflection.isAnnotationMethodPresent(oObj, "MethodWithAnnotation", "AnnotationIsAnnotationMethodPresent")) Conout(Reflection.isAnnotationMethodPresent(oObj, "MethodWithAnnotation", "NoExist")) Return |
#include "tlpp-core.th" @annotation AnnotationIsAnnotationMethodPresent nickname as char @end Class IsAnnotationMethodPresent Public Method New() @AnnotationIsAnnotationMethodPresent(nickname = "Company") Public Method MethodWithAnnotation() EndClass Method New() class IsAnnotationMethodPresent Return Self Method MethodWithAnnotation() class IsAnnotationMethodPresent Return Function u_testIsAnnotationMethodPresent() Conout(Reflection.isAnnotationMethodPresent("IsAnnotationMethodPresent", "MethodWithAnnotation", "AnnotationIsAnnotationMethodPresent")) Conout(Reflection.isAnnotationMethodPresent("IsAnnotationMethodPresent", "MethodWithAnnotation", "NoExist")) Return |
.T.
.F.
17.3.0.3