nitc :: JavaClassTemplate :: _header
nitc :: JavaClassTemplate :: defaultinit
nitc :: JavaClassTemplate :: header
nitc :: JavaClassTemplate :: header=
nitc $ JavaClassTemplate :: SELF
Type of this instance, automatically specialized in every classnitc $ JavaClassTemplate :: rendering
Service used to render the content of the template.nitc :: android $ JavaClassTemplate :: write_to_files
nitc :: JavaClassTemplate :: _header
template :: Template :: _is_frozen
Is the template allowing more modification (add
)
template :: Template :: _is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: _render_done
Flag to avoid multiple renderingcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: JavaClassTemplate :: defaultinit
core :: Object :: defaultinit
core :: Writable :: defaultinit
template :: Template :: defaultinit
nitc :: JavaClassTemplate :: header
nitc :: JavaClassTemplate :: header=
template :: Template :: is_frozen=
Is the template allowing more modification (add
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
template :: Template :: is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: is_writing=
Flag to avoid infinite recursivity if a template contains itselfcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).template :: Template :: render_done=
Flag to avoid multiple renderingcore :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
# Java class source template
class JavaClassTemplate
super Template
var java_class_name: String
var header = new Template
var class_content = new Template
fun write_to_files(compdir: String): ExternFile
do
var filename = "{java_class_name}.java"
var filepath = compdir/filename
write_to_file filepath
return new JavaFile(filename)
end
redef fun rendering
do
add header
add "\n"
add "public class {java_class_name} \{\n"
add class_content
add "\}"
end
end
src/ffi/java.nit:395,1--422,3