Árvore de páginas

Você está vendo a versão antiga da página. Ver a versão atual.

Comparar com o atual Ver Histórico da Página

« Anterior Versão 8 Atual »

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

  • Sem rótulos