Introduced properties

Redefined properties

redef type SELF: RoutineTemplate

functional $ RoutineTemplate :: SELF

Type of this instance, automatically specialized in every class
redef fun to_s: String

functional $ RoutineTemplate :: to_s

User readable representation of self.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
protected fun annotation=(annotation: String)

functional :: RoutineTemplate :: annotation=

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
protected fun classkind=(classkind: String)

functional :: RoutineTemplate :: classkind=

protected fun classname=(classname: String)

functional :: RoutineTemplate :: classname=

init defaultinit(classkind: String, classname: String, nb_generics: Int, supers: Array[String], has_return: Bool)

functional :: RoutineTemplate :: defaultinit

fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
protected fun has_return=(has_return: Bool)

functional :: RoutineTemplate :: has_return=

fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
protected fun is_redef=(is_redef: Bool)

functional :: RoutineTemplate :: is_redef=

intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
protected fun nb_generics=(nb_generics: Int)

functional :: RoutineTemplate :: nb_generics=

intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
protected fun supers=(supers: Array[String])

functional :: RoutineTemplate :: supers=

intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram functional::RoutineTemplate RoutineTemplate core::Object Object functional::RoutineTemplate->core::Object

Parents

interface Object

core :: Object

The root of the class hierarchy.

Class definitions

functional $ RoutineTemplate
class RoutineTemplate
        var classkind: String
        var classname: String
        var nb_generics: Int
        var supers: Array[String]
        var has_return: Bool
        var is_redef = false
        var annotation = "is abstract"

        fun callparams: Array[String]
        do
                var generics = gen_generics(nb_generics)
                var params = new Array[String]
                for g in generics do
                        if is_redef then
                                params.push(g.to_lower)
                        else
                                params.push(g.to_lower + ": " + g)
                        end
                end
                return params
        end

        fun classparams: Array[String]
        do
                var res = gen_generics(nb_generics)
                if has_return then res.add("RESULT")
                return res
        end

        redef fun to_s
        do
                var signature = ""
                var callparams = self.callparams
                var classparams = self.classparams

                if callparams.length > 0 then signature = "({callparams.join(",")})"
                if has_return then signature += ": RESULT"
                var classdecl = "{classkind} {classname}"
                if classparams.length > 0 then classdecl += "[{classparams.join(",")}]"
                var superdecls = new Array[String]
                for s in supers do superdecls.add("\tsuper {s}")

                var classdef = new Array[String]
                var redefkw = ""
                if is_redef then redefkw = "redef "
                classdef.add("{classdecl}")
                classdef.add("{superdecls.join("\n")}")
                classdef.add("\t{redefkw}fun call{signature} {annotation}")
                classdef.add("end")
                return classdef.join("\n")
        end
end
lib/functional/functional_gen.nit:31,1--83,3