Árvore de páginas

Versões comparadas

Chave

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

...

Bloco de código
languagecpp
themeEclipse
titleexemplo1.tlpp
linenumberstrue
#include "tlpp-objectcore.th"
 
@annotation DataAnnotation
  nickname as char
@end
 
Class GetDataAnnotation
  
  @DataAnnotation(nickname = "Company")
  Public data data1

  Public Method New()

EndClass

Method New() class GetDataAnnotation
Return Self
   
Function u_testGetDataAnnotation()

  Local oObj := GetDataAnnotation():New()
  Local jRet
  
  If ( Reflection.isAnnotationDataPresent(oObj, "data1", "DataAnnotation") )
    jRet := Reflection.getDataAnnotation(oObj, "data1", "DataAnnotation")
    Conout(jRet["nickname"])
  EndIf
  
Return

...