Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
collapsefalse
Reflection.isAnnotationMethodPresent( oObjxParam, cMethodName, cAnnotationName )

...

Nome

Tipo

Descrição

Obrigatório

Referência

oObjxParam

objeto/caractere**

Objeto onde proprietário 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
caractereNome da Annotation que será procurada.           X

...

Bloco de código
languagecpp
themeEclipse
titletest_doc_IsAnnotationMethodPresentexemplo1.tlpp
linenumberstrue
#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
Bloco de código

...

languagecpp
themeEclipse
titleexemplos2.tlpp
linenumberstrue
#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

Resultado dos Exemplos

.T.

.F.

Abrangência

17.3.0.3

...