MModuleData
where multiples values could be set on a single modulea-la MultiHashMap
nitc :: MModuleMultiData :: defaultinit
nitc :: MModuleMultiData :: lookup_joined_values
likelookup_all_values
but return a big concatenated sequence (instead of a sequence of array)
nitc $ MModuleMultiData :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MModuleMultiData :: defaultinit
core :: Object :: defaultinit
nitc :: MModuleData :: defaultinit
nitc :: MModuleData :: has_mmodule
is a value locally defined inmmodule
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 :: MModuleData :: lookup_all_modules
Return all the super modules that defines a valuenitc :: MModuleData :: lookup_all_values
Return all the values defined inmmodule
and its imported modules.
nitc :: MModuleData :: lookup_first_value
Return the most specific values defined inmmodule
and its imported modules.
nitc :: MModuleMultiData :: lookup_joined_values
likelookup_all_values
but return a big concatenated sequence (instead of a sequence of array)
nitc :: MModuleData :: lookup_values
Return the most specific values defined inmmodule
and its imported modules.
core :: 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).
# A `MModuleData` where multiples values could be set on a single module
# a-la `MultiHashMap`
class MModuleMultiData[E]
super MModuleData[Array[E]]
# Instead of `null` return an empty array usable
redef fun [](mmodule)
do
var res = super
if res == null then
res = new Array[E]
defs[mmodule] = res
end
return res
end
# like `lookup_all_values` but return a big concatenated sequence (instead of a sequence of array)
fun lookup_joined_values(mmodule: MModule, min_visibility: MVisibility): Sequence[E]
do
var mmodules = lookup_all_modules(mmodule, min_visibility)
mmodules = model.mmodule_importation_hierarchy.linearize(mmodules)
var res = new Array[E]
for m in mmodules do res.add_all defs[m]
return res
end
end
src/model/mmodule_data.nit:104,1--129,3