diff --git a/generator/src/main/java/io/github/jwharm/javagi/model/Interface.java b/generator/src/main/java/io/github/jwharm/javagi/model/Interface.java index e9f8f645..293153e4 100644 --- a/generator/src/main/java/io/github/jwharm/javagi/model/Interface.java +++ b/generator/src/main/java/io/github/jwharm/javagi/model/Interface.java @@ -50,9 +50,17 @@ public void generate(Writer writer) throws IOException { public void generateImplClass(Writer writer) throws IOException { writer.write(" \n"); + writer.write(" /**\n"); + writer.write(" * The " + javaName + "Impl type represents a native instance of the " + javaName + " interface.\n"); + writer.write(" */\n"); writer.write(" class " + javaName + "Impl extends org.gtk.gobject.GObject implements " + javaName + " {\n"); generateEnsureInitialized(writer, " "); writer.write(" \n"); + writer.write(" /**\n"); + writer.write(" * Creates a new instance of " + javaName + " for the provided memory address.\n"); + writer.write(" * @param address the memory address of the instance\n"); + writer.write(" * @param ownership the ownership indicator of the instance\n"); + writer.write(" */\n"); writer.write(" public " + javaName + "Impl(Addressable address, Ownership ownership) {\n"); writer.write(" super(address, ownership);\n"); writer.write(" }\n"); diff --git a/generator/src/main/java/io/github/jwharm/javagi/model/ValueWrapper.java b/generator/src/main/java/io/github/jwharm/javagi/model/ValueWrapper.java index 36873d96..d9c4d854 100644 --- a/generator/src/main/java/io/github/jwharm/javagi/model/ValueWrapper.java +++ b/generator/src/main/java/io/github/jwharm/javagi/model/ValueWrapper.java @@ -12,6 +12,9 @@ public ValueWrapper(GirElement parent, String name, String parentClass, String c public void generateValueConstructor(Writer writer, String typeStr) throws IOException { writer.write(" \n"); + writer.write(" /**\n"); + writer.write(" * Create a new " + javaName + " with the provided value\n"); + writer.write(" */\n"); writer.write(" public " + javaName + "(" + typeStr + " value) {\n"); writer.write(" super(value);\n"); writer.write(" }\n");