nitc :: MNullableType :: _api_url
nitc :: MNullableType :: _c_name
nitc :: MNullableType :: _full_name
nitc :: MNullableType :: _to_s
nitc :: MNullableType :: _web_url
nitc :: MNullableType :: api_url=
nitc :: MNullableType :: c_name=
nitc :: MNullableType :: defaultinit
nitc :: MNullableType :: full_name=
nitc :: MNullableType :: to_s=
nitc :: MNullableType :: web_url=
nitc $ MNullableType :: SELF
Type of this instance, automatically specialized in every classnitc $ MNullableType :: as_nullable
Return the nullable version of the typenitc $ MNullableType :: c_name
A fully-qualified C-like identifier of this model entity.nitc :: compiler_ffi $ MNullableType :: compile_extern_helper_functions
nitc :: term_model $ MNullableType :: cs_signature
Returnsself
signature formatted for console.
nitc $ MNullableType :: full_name
A fully-qualified name of this model entity.nitc :: html_model $ MNullableType :: html_signature
Returns the MEntity signature decorated with HTMLnitc :: htmlight $ MNullableType :: infobox
An new infobox documenting the entitynitc $ MNullableType :: init
nitc :: htmlight $ MNullableType :: linkto
A HTML version ofto_s
with hyper-links.
nitc $ MNullableType :: lookup_fixed
Efficiently returnsmtype.lookup_fixed(mmodule, resolved_receiver).as_nullable
nitc :: nitni_base $ MNullableType :: mangled_cname
Representation of this type in mangled Cnitc $ MNullableType :: mdoc_or_fallback
The documentation associated to the entity or their main nested entity.nitc :: nitrestful $ MNullableType :: needs_type_check
Does this parameter type needs to be checked before calling the method?nitc $ MNullableType :: resolve_for
Replace formals generic types in self with resolved values inmtype
nitc :: MNullableType :: _api_url
nitc :: MType :: _as_nullable_cache
nitc :: MNullableType :: _c_name
nitc :: MEntity :: _const_color
nitc :: MEntity :: _css_classes
CSS classes used to decorateself
nitc :: MEntity :: _deprecation
Is the entity deprecated?nitc :: MNullableType :: _full_name
nitc :: MEntity :: _html_full_name
The MEntityfull_name
escaped for HTML
nitc :: MEntity :: _is_broken
The indication that the entity did not pass some semantic verifications.nitc :: MType :: _is_java_primitive
Is the associated Java type a primitive one?nitc :: MNullableType :: _to_s
nitc :: MNullableType :: _web_url
serialization :: Serializable :: accept_inspect_serializer_core
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePacknitc :: MEntity :: add_doc_to_infobox
Append an entry for the doc in the given infoboxserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
nitc :: MNullableType :: api_url=
nitc :: MType :: as_nullable_cache
nitc :: MType :: as_nullable_cache=
nitc :: MNullableType :: c_name=
nitc :: MType :: call_arg_field
Field to store this type in the C structurenit_call_arg
nitc :: MType :: can_resolve_for
Can the type be resolved?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MType :: cname_blind
Representation of this type in C for the internal of the systemnitc :: MType :: cname_normal_class
Name of this type in C for normal classes (not extern and not primitive)nitc :: MEntity :: collect_ancestors
Collectself
ancestors (direct and indirect)
nitc :: MEntity :: collect_children
Collectself
children (direct descendants)
nitc :: MEntity :: collect_descendants
Collectself
descendants (direct and direct)
nitc :: MEntity :: collect_linearization
Collectself
linearization anchored on mainmodule
nitc :: MType :: collect_mclassdefs
Compute all the classdefs inherited/imported.nitc :: MType :: collect_mclasses
Compute all the super-classes.nitc :: MEntity :: collect_metrics
nitc :: MEntity :: collect_modifiers
Collect modifier keywords likeredef
, private
etc
nitc :: MType :: collect_mtypes
Compute all the declared super-types.nitc :: MEntity :: collect_parents
Collectself
parents (direct ancestors)
nitc :: NitniCallback :: compile_callback_to_java
Compile C and Java code to implement this callbacknitc :: NitniCallback :: compile_callback_to_objc
Compile this callback to be callable from Objective-Cnitc :: MType :: compile_extern_type
nitc :: MEntity :: const_color
nitc :: MEntity :: const_color=
nitc :: MEntity :: core_serialize_base
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
nitc :: MEntity :: create_ast_representation
Build a ANode fromself
nitc :: MEntity :: cs_comment
Returns the comment of this MEntity formatted for console.nitc :: MEntity :: cs_declaration
Returns the complete MEntity declaration (modifiers + name + signature).nitc :: MEntity :: cs_full_name
Returnsself.full_name
formatted for console
nitc :: MEntity :: cs_list_item
Returnsself
as a list element that can be displayed in console.
nitc :: MEntity :: cs_location
Source code location of this MEntity formatted for consolenitc :: MEntity :: cs_short_comment
Returns the comment of this MEntity formatted for console.nitc :: MEntity :: cs_signature
Returnsself
signature formatted for console.
nitc :: MEntity :: cs_source_code
Source code associated to this MEntity.nitc :: MEntity :: css_classes=
CSS classes used to decorateself
nitc :: MType :: ctype_extern
C type outside of the compiler code and in boxesnitc :: MProxyType :: defaultinit
nitc :: NitniCallback :: defaultinit
nitc :: MNullableType :: defaultinit
nitc :: HInfoBoxable :: defaultinit
nitc :: MEntity :: defaultinit
nitc :: MType :: defaultinit
core :: Object :: defaultinit
nitc :: MEntity :: deprecation=
Is the entity deprecated?nitc :: MEntity :: field_separator
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
nitc :: MNullableType :: full_name=
nitc :: MType :: gen_arg_convert
Write code intemplate
to parse the argument arg_name
to this parameter type
nitc :: MType :: has_mproperty
Is the property in self for a given modulenitc :: MEntity :: hierarchy_poset
Build a poset representingself
in it's own hierarchy
nitc :: MEntity :: html_declaration
Returns the complete MEntity declaration decorated with HTMLnitc :: MEntity :: html_full_name=
The MEntityfull_name
escaped for HTML
nitc :: MEntity :: html_name=
The MEntity name escaped for HTMLnitc :: MEntity :: html_namespace
Returnsfull_name
decorated with HTML links
nitc :: MEntity :: html_signature
Returns the MEntity signature decorated with HTMLnitc :: HInfoBoxable :: infobox
An new infobox documenting the entitynitc :: MEntity :: is_broken=
The indication that the entity did not pass some semantic verifications.nitc :: MType :: is_cprimitive
Does this type have a primitive representation?nitc :: MEntity :: is_fictive=
Isself
created for internal purpose?
nitc :: MType :: is_java_primitive
Is the associated Java type a primitive one?nitc :: MType :: is_java_primitive=
Is the associated Java type a primitive one?nitc :: MType :: is_legal_in
Is the type legal in a givenmmodule
(with an optional anchor
)?
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.
nitc :: MType :: is_subtype
Return true ifself
is an subtype of sup
.
nitc :: MType :: is_subtype_invar
Return true ifself
is a invariant subtype of sup
.
nitc :: MType :: java_is_nit_object
Is this type opaque in Java? As so it is represented bynit.app.NitObject
.
nitc :: NitniCallback :: jni_methods_declaration
Returns the list of C functions to link with extern Java methods, as requirednitc :: MType :: jni_signature_alt
Type name appearing within JNI function names.nitc :: MEntity :: json_namespace
Returnself.full_name
as an object that can be serialized to json.
nitc :: MEntity :: line_separator
nitc :: MEntity :: linkto_text
Link to theself
with a specific text.
nitc :: MType :: lookup_bound
Resolve formal type to its verbatim bound.nitc :: MType :: lookup_fixed
Resolve the formal type to its simplest equivalent form.nitc :: MType :: mangled_cname
Representation of this type in mangled Cnitc :: MEntity :: mdoc_or_fallback
The documentation associated to the entity or their main nested entity.serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: Object :: native_class_name
The class name of the object in CString format.nitc :: MType :: need_anchor
Doesself
contain a virtual type or a formal generic parameter type?
nitc :: MType :: needs_type_check
Does this parameter type needs to be checked before calling the method?core :: Object :: output_class_name
Display class name on stdout (debug only).mentity
nitc :: MEntity :: ratings_by_dimension
Get the ratings of adimension
nitc :: MType :: resolve_for
Replace formals generic types in self with resolved values inmtype
serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: serialize_to_or_delay
Accept references or force direct serialization (usingserialize_to
)
nitc :: MType :: signature_depth
nitc :: MEntity :: source_url
Render a HTML link for the MEntity locationnitc :: MType :: supertype_to
Return the supertype when adapted to a class.serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
nitc :: MNullableType :: to_s=
nitc :: MEntity :: tpl_module
Builds a dot UML package diagram entity fromself
v.enter_visit
on all nested entities.
nitc :: MNullableType :: web_url=
nitc :: MEntity :: write_extra_doc
Extra auto documentation to append to thestream
nitc :: MEntity :: write_location
Location (file and line when available) of related declarations
# A type prefixed with "nullable"
class MNullableType
super MProxyType
init
do
self.to_s = "nullable {mtype}"
end
redef var to_s is noinit
redef var full_name is lazy do return "nullable {mtype.full_name}"
redef var c_name is lazy do return "nullable__{mtype.c_name}"
redef fun as_nullable do return self
redef fun resolve_for(mtype, anchor, mmodule, cleanup_virtual)
do
var res = super
return res.as_nullable
end
# Efficiently returns `mtype.lookup_fixed(mmodule, resolved_receiver).as_nullable`
redef fun lookup_fixed(mmodule, resolved_receiver)
do
var t = super
if t == mtype then return self
return t.as_nullable
end
redef fun mdoc_or_fallback do return mtype.mdoc_or_fallback
end
src/model/model.nit:1830,1--1861,3
redef class MNullableType
redef fun mangled_cname do return "nullable_{mtype.mangled_cname}"
end
src/nitni/nitni_base.nit:138,1--140,3
redef class MNullableType
redef fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode do
if nodes.has_key(self) then return nodes[self]
var node = super
node.labels.add "MNullableType"
node.out_edges.add(new NeoEdge(node, "TYPE", mtype.to_node(nodes, model_name)))
return node
end
end
src/neo.nit:924,1--932,3
redef class MNullableType
redef fun cs_signature(no_color) do
var tpl = new FlatBuffer
tpl.append "nullable "
tpl.append mtype.cs_signature(no_color)
return tpl.write_to_string
end
end
src/doc/templates/term_model.nit:221,1--228,3
redef class MNullableType
redef fun needs_type_check do return name != "nullable String" and name != "nullable Object"
end
src/nitrestful.nit:145,1--147,3
redef class MNullableType
redef fun compile_extern_helper_functions(v, ccu, compile_implementation_too)
do
super
var base_cname = "null_{mtype.mangled_cname}"
var full_cname = "NIT_NULL___{base_cname}"
# In nitni files, declare internal function as extern
var full_friendly_csignature = "{cname_blind} {full_cname}()"
ccu.header_decl.add("extern {full_friendly_csignature};\n")
# In nitni files, #define friendly as extern
ccu.header_decl.add("#define {base_cname} {full_cname}\n")
if not compile_implementation_too then return
# FIXME: This is ugly an broke the separate compilation principle
# The real function MUST be compiled only once, #define pragma only protect the compiler, not the loader
# However, I am not sure of the right approach here (eg. week refs are ugly)
if v.compiler.compiled_null_types.has(self) then return
v.compiler.compiled_null_types.add self
# Internally, implement internal function
var nitni_visitor = v.compiler.new_visitor
nitni_visitor.frame = v.frame
var full_internal_csignature = "{cname_blind} {full_cname}()"
nitni_visitor.add("{full_internal_csignature} \{")
nitni_visitor.add("struct nitni_instance* ret_for_c;")
nitni_visitor.add("ret_for_c = nit_alloc(sizeof(struct nitni_instance));")
nitni_visitor.add("ret_for_c->value = NULL;")
nitni_visitor.add("return ret_for_c;")
nitni_visitor.add("\}")
end
end
src/compiler/compiler_ffi/compiler_ffi.nit:163,1--197,3
redef class MNullableType
redef fun html_signature(short) do
var tpl = new Template
tpl.add "nullable "
tpl.add mtype.html_signature(short)
return tpl
end
end
src/doc/templates/html_model.nit:283,1--290,3