Á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 PrimeiraAnnotation
    empresa as char
@end
  
  
@annotation SegundaAnnotation
    tipo as char
@end
   
  
@PrimeiraAnnotation(empresa = "Totvs")
@SegundaAnnotation(tipo = "Software")

class GetClassAnnotationList
    public method new()
EndClass
   
Method new() Class GetClassAnnotationList
return self
   
function u_testGetClassAnnotationList()

    local aRet as array
  
    aRet := Reflection.getClassAnnotationList("GetClassAnnotationList")
    
    if (valType(aRet) == "A") .and. (len(aRet) > 0)
      conout(aRet[1]["empresa"])
      conout(aRet[2]["tipo"])
    else
      conout('Não foi encontrada nenhuma Annotation na classe declarada !')  
    endif
return

...