Пример #1
0
 public void genName(NamedElement element, Context ctx, TabbedWriter out) {
   if (element instanceof Member && ((Member) element).getContainer() instanceof ExternalType) {
     Member member = (Member) element;
     if (CommonUtilities.isJavaExternalType((ExternalType) member.getContainer())) {
       // for java external types, either use the given external name or the name as is
       if (member.getAnnotation("eglx.lang.ExternalName") != null)
         out.print((String) member.getAnnotation("eglx.lang.ExternalName").getValue());
       else out.print(element.getCaseSensitiveName());
       return;
     }
   }
   out.print(JavaAliaser.getAlias(element.getCaseSensitiveName()));
 }
Пример #2
0
 public void genAccessor(NamedElement element, Context ctx, TabbedWriter out) {
   String propertyFunction = CommonUtilities.getPropertyFunction(element, false, ctx);
   if (propertyFunction != null) {
     FunctionMember currentFunction = ctx.getCurrentFunction();
     if (currentFunction != null
         && propertyFunction.equals(currentFunction.getCaseSensitiveName()))
       genName(element, ctx, out);
     else {
       out.print(propertyFunction);
       out.print("()");
     }
   } else genName(element, ctx, out);
 }