public JavaGenerator(BindingContext context) : base(context)
        {
            TypePrinter = new JavaTypePrinter(Context);

            Passes = new PassBuilder <TranslationUnitPass>(Context);
            CGenerator.SetupPasses(Passes);
        }
Exemple #2
0
 public JavaSources(BindingContext context, TranslationUnit unit)
     : base(context, new List <TranslationUnit> {
     unit
 })
 {
     TypePrinter = new JavaTypePrinter(context);
 }
 public JavaSources(BindingContext context, TranslationUnit unit)
     : base(context, new List <TranslationUnit> {
     unit
 })
 {
     TypePrinter = new JavaTypePrinter(context);
     VisitOptions.VisitPropertyAccessors = true;
 }
Exemple #4
0
        public override bool VisitClassDecl(Class @class)
        {
            var typePrinter = new JavaTypePrinter(Context.Context);
            var typeName    = @class.Visit(typePrinter);

            if (@class.IsInterface || @class.IsAbstract)
            {
                typeName = $"{typeName}Impl";
            }

            Context.Return.Write("({0} == com.sun.jna.Pointer.NULL ? null : new {1}({0}))",
                                 Context.ReturnVarName, typeName);
            return(true);
        }
Exemple #5
0
 public JavaMarshalPrinter(MarshalContext marshalContext)
     : base(marshalContext)
 {
     TypePrinter = new JavaTypePrinter(Context.Context);
 }
Exemple #6
0
 public JavaMarshalPrinter(BindingContext context)
     : base(context)
 {
     TypePrinter = new JavaTypePrinter(Context);
 }