Add explicit default constructors to abstract Java classes.
This commit is contained in:
parent
4d5625a06f
commit
bc950bc543
@ -141,6 +141,13 @@ EOT
|
|||||||
* This class is a base class for all TDLib interface classes.
|
* This class is a base class for all TDLib interface classes.
|
||||||
*/
|
*/
|
||||||
EOT
|
EOT
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->addDocumentation(" public Object() {", <<<EOT
|
||||||
|
/**
|
||||||
|
* Default Object constructor.
|
||||||
|
*/
|
||||||
|
EOT
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addDocumentation(' public abstract int getConstructor();', <<<EOT
|
$this->addDocumentation(' public abstract int getConstructor();', <<<EOT
|
||||||
@ -162,6 +169,13 @@ EOT
|
|||||||
* This class is a base class for all TDLib interface function-classes.
|
* This class is a base class for all TDLib interface function-classes.
|
||||||
*/
|
*/
|
||||||
EOT
|
EOT
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->addDocumentation(" public Function() {", <<<EOT
|
||||||
|
/**
|
||||||
|
* Default Function constructor.
|
||||||
|
*/
|
||||||
|
EOT
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addDocumentation(' public static final int CONSTRUCTOR', <<<EOT
|
$this->addDocumentation(' public static final int CONSTRUCTOR', <<<EOT
|
||||||
@ -187,6 +201,12 @@ EOT
|
|||||||
* $documentation
|
* $documentation
|
||||||
*/
|
*/
|
||||||
EOT
|
EOT
|
||||||
|
);
|
||||||
|
$this->addDocumentation(" public $class_name() {", <<<EOT
|
||||||
|
/**
|
||||||
|
* Default class constructor.
|
||||||
|
*/
|
||||||
|
EOT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,8 +234,11 @@ std::string TD_TL_writer_java::gen_class_begin(const std::string &class_name, co
|
|||||||
full_class_name += "<" + fetched_type + ">";
|
full_class_name += "<" + fetched_type + ">";
|
||||||
}
|
}
|
||||||
std::string result = " public " + std::string(is_proxy ? "abstract " : "") + full_class_name + " {\n";
|
std::string result = " public " + std::string(is_proxy ? "abstract " : "") + full_class_name + " {\n";
|
||||||
|
if (is_proxy) {
|
||||||
|
result += " public " + class_name + "() {\n }\n";
|
||||||
|
}
|
||||||
if (class_name == gen_base_tl_class_name() || class_name == gen_base_function_class_name()) {
|
if (class_name == gen_base_tl_class_name() || class_name == gen_base_function_class_name()) {
|
||||||
result += " public native String toString();\n";
|
result += "\n public native String toString();\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user