Refine Serializable::inspect to show more useful information

Introduced classes

private class InspectSerializer

serialization :: InspectSerializer

Serialization engine writing the object attributes to strings

Redefined classes

redef enum Bool

serialization :: inspect $ Bool

Native Booleans.
redef enum Byte

serialization :: inspect $ Byte

Native bytes.
redef extern class CString

serialization :: inspect $ CString

C string char *
redef enum Char

serialization :: inspect $ Char

Native characters.
redef interface Collection[E: nullable Object]

serialization :: inspect $ Collection

The root of the collection hierarchy.
redef enum Float

serialization :: inspect $ Float

Native floating point numbers.
redef enum Int

serialization :: inspect $ Int

Native integer numbers.
redef interface Map[K: nullable Object, V: nullable Object]

serialization :: inspect $ Map

Maps are associative collections: key -> item.
redef interface Serializable

serialization :: inspect $ Serializable

Instances of this class can be passed to Serializer::serialize
redef interface SimpleCollection[E: nullable Object]

serialization :: inspect $ SimpleCollection

Items can be added to these collections.
redef class Sys

serialization :: inspect $ Sys

The main class of the program.
redef abstract class Text

serialization :: inspect $ Text

High-level abstraction for all text representations

All class definitions

redef enum Bool

serialization :: inspect $ Bool

Native Booleans.
redef enum Byte

serialization :: inspect $ Byte

Native bytes.
redef extern class CString

serialization :: inspect $ CString

C string char *
redef enum Char

serialization :: inspect $ Char

Native characters.
redef interface Collection[E: nullable Object]

serialization :: inspect $ Collection

The root of the collection hierarchy.
redef enum Float

serialization :: inspect $ Float

Native floating point numbers.
private class InspectSerializer

serialization $ InspectSerializer

Serialization engine writing the object attributes to strings
redef enum Int

serialization :: inspect $ Int

Native integer numbers.
redef interface Map[K: nullable Object, V: nullable Object]

serialization :: inspect $ Map

Maps are associative collections: key -> item.
redef interface Serializable

serialization :: inspect $ Serializable

Instances of this class can be passed to Serializer::serialize
redef interface SimpleCollection[E: nullable Object]

serialization :: inspect $ SimpleCollection

Items can be added to these collections.
redef class Sys

serialization :: inspect $ Sys

The main class of the program.
redef abstract class Text

serialization :: inspect $ Text

High-level abstraction for all text representations
package_diagram serialization::inspect inspect serialization::caching caching serialization::inspect->serialization::caching serialization::engine_tools engine_tools serialization::caching->serialization::engine_tools ...serialization::engine_tools ... ...serialization::engine_tools->serialization::engine_tools serialization::serialization serialization serialization::serialization->serialization::inspect serialization::serialization... ... serialization::serialization...->serialization::serialization

Ancestors

module abstract_collection

core :: abstract_collection

Abstract collection classes and services.
module abstract_text

core :: abstract_text

Abstract class for manipulation of sequences of characters
module array

core :: array

This module introduces the standard array structure.
module bitset

core :: bitset

Services to handle BitSet
module bytes

core :: bytes

Services for byte streams and arrays
module circular_array

core :: circular_array

Efficient data structure to access both end of the sequence.
module codec_base

core :: codec_base

Base for codecs to use with streams
module codecs

core :: codecs

Group module for all codec-related manipulations
module collection

core :: collection

This module define several collection classes.
module core

core :: core

Standard classes and methods used by default by Nit programs and libraries.
module engine_tools

serialization :: engine_tools

Advanced services for serialization engines
module environ

core :: environ

Access to the environment variables of the process
module error

core :: error

Standard error-management infrastructure.
module exec

core :: exec

Invocation and management of operating system sub-processes.
module file

core :: file

File manipulations (create, read, write, etc.)
module fixed_ints

core :: fixed_ints

Basic integers of fixed-precision
module fixed_ints_text

core :: fixed_ints_text

Text services to complement fixed_ints
module flat

core :: flat

All the array-based text representations
module gc

core :: gc

Access to the Nit internal garbage collection mechanism
module hash_collection

core :: hash_collection

Introduce HashMap and HashSet.
module iso8859_1

core :: iso8859_1

Codec for ISO8859-1 I/O
module kernel

core :: kernel

Most basic classes and methods.
module list

core :: list

This module handle double linked lists
module math

core :: math

Mathematical operations
module meta

meta :: meta

Simple user-defined meta-level to manipulate types of instances as object.
module native

core :: native

Native structures for text and bytes
module numeric

core :: numeric

Advanced services for Numeric types
module protocol

core :: protocol

module queue

core :: queue

Queuing data structures and wrappers
module range

core :: range

Module for range of discrete objects.
module re

core :: re

Regular expression support for all services based on Pattern
module ropes

core :: ropes

Tree-based representation of a String.
module serialization_core

serialization :: serialization_core

Abstract services to serialize Nit objects to different formats
module sorter

core :: sorter

This module contains classes used to compare things and sorts arrays.
module stream

core :: stream

Input and output streams of characters
module text

core :: text

All the classes and methods related to the manipulation of text entities
module time

core :: time

Management of time and dates
module union_find

core :: union_find

union–find algorithm using an efficient disjoint-set data structure
module utf8

core :: utf8

Codec for UTF-8 I/O

Parents

module caching

serialization :: caching

Services for caching serialization engines

Children

module serialization

serialization :: serialization

General serialization services

Descendants

module a_star

a_star :: a_star

A* pathfinding in graphs
module a_star-m

a_star-m

module abstract_compiler

nitc :: abstract_compiler

Abstract compiler
module actors_generation_phase

nitc :: actors_generation_phase

Generate a support module for each module that contain a class annotated with is actor
module actors_injection_phase

nitc :: actors_injection_phase

Injects model for the classes annotated with "is actor" so
module android

nitc :: android

Compile program for the Android platform
module android19

gamnit :: android19

Variation using features from Android API 19
module android_annotations

nitc :: android_annotations

Additionnal annotations to gather metadata on Android projects
module angles

geometry :: angles

Angle related service using Float to represent an angle in radians
module annotation

nitc :: annotation

Management and utilities on annotations
module api

github :: api

Nit object oriented interface to Github api.
module api

nitc :: api

Components required to build a web server about the nit model.
module api_auth

nitc :: api_auth

module api_base

nitc :: api_base

Base classes used by nitweb.
module api_docdown

nitc :: api_docdown

Nitdoc specific Markdown format handling for Nitweb
module api_feedback

nitc :: api_feedback

Feedback related features
module api_light

nitc :: api_light

Highlight and collect messages from a piece of code
module api_model

nitc :: api_model

module app_annotations

nitc :: app_annotations

Annotations to gather metadata on app.nit projects
module ast_metrics

nitc :: ast_metrics

Metrics about the nodes and identifiers in the AST
module astbuilder

nitc :: astbuilder

Instantiation and transformation of semantic nodes in the AST of expressions and statements
module at_boot

android :: at_boot

Import this module to launch Service at device boot
module auto_super_init

nitc :: auto_super_init

Computing of super-constructors that must be implicitly called at the begin of constructors.
module bmfont

gamnit :: bmfont

Parse Angel Code BMFont format and draw text
module boxes

geometry :: boxes

Provides interfaces and classes to represent basic geometry needs.
module bucketed_game

bucketed_game :: bucketed_game

Game framework with an emphasis on efficient event coordination
module bundle

android :: bundle

A mapping class of String to various value types used by the
module c

nitc :: c

Support for nesting C code within a Nit program using its FFI
module c_compiler_options

nitc :: c_compiler_options

Offers the annotations cflags and ldflags to specify
module cache

github :: cache

Enable caching on Github API accesses.
module camera_control

gamnit :: camera_control

Simple camera control for user, as the method accept_scroll_and_zoom
module camera_control_android

gamnit :: camera_control_android

Two fingers camera manipulation, pinch to zoom and slide to scroll
module camera_control_linux

gamnit :: camera_control_linux

Mouse wheel and middle mouse button to control camera
module cameras

gamnit :: cameras

Camera services producing Model-View-Projection matrices
module cameras_cache

gamnit :: cameras_cache

Cache the Matrix produced by Camera::mvp_matrix
module cardboard

gamnit :: cardboard

Update the orientation of world_camera at each frame using the head position given by android::cardboard
module catalog

nitc :: catalog

Basic catalog generator for Nit packages
module check_annotation

nitc :: check_annotation

Check that annotation present in the AST are either primitive or user-declared
module checker

dom :: checker

Simple XML validity checker using the dom module
module client

gamnit :: client

Client-side network services for games and such
module code_gen

nitc :: code_gen

Main frontend phases plus code generation phases
module commands_base

nitc :: commands_base

Documentation commands
module commands_catalog

nitc :: commands_catalog

Commands to retrieve Catalog related data
module commands_docdown

nitc :: commands_docdown

Doc down related queries
module commands_graph

nitc :: commands_graph

Graph commands
module commands_http

nitc :: commands_http

Initialize commands from HTTP requests
module commands_model

nitc :: commands_model

Doc commands about a Model or a MEntity
module commands_parser

nitc :: commands_parser

A parser that create DocCommand from a string
module commands_usage

nitc :: commands_usage

Commands about how mentities are used
module common

gamnit :: common

Services common to the client and server modules
module commonmark_gen

markdown2 :: commonmark_gen

Generate Nitunit tests from commonmark specification.
module compilation

nitc :: compilation

The compilation module of the VirtualMachine
module compiler

nitc :: compiler

Compilation to C
module compiler_ffi

nitc :: compiler_ffi

Full FFI support for the compiler
module compiler_serialization

nitc :: compiler_serialization

Serialization support for the compiler
module contracts

nitc :: contracts

Module to build contract
module cpp

nitc :: cpp

Supports the use of the C++ language through the FFI
module curl_json

neo4j :: curl_json

cURL requests compatible with the JSON REST APIs.
module curl_rest

curl :: curl_rest

module custom_serialization

serialization :: custom_serialization

Example of an ad hoc serializer that is tailored to transform business specific objects into customized representation.
module data_store

android :: data_store

Implements app::data_store using shared_preferences
module data_store

app :: data_store

Key/value storage services
module data_store

ios :: data_store

Implements app::data_store using NSUserDefaults
module data_store

linux :: data_store

app::data_store implementation on GNU/Linux
module depth

gamnit :: depth

Framework for 3D games in Nit
module depth_core

gamnit :: depth_core

Base entities of the depth 3D game framework
module deriving

nitc :: deriving

Injection of automatic method definitions for standard methods, based on the attributes of the classes
module detect_covariance

nitc :: detect_covariance

Detect the static usage of covariance in the code.
module detect_variance_constraints

nitc :: detect_variance_constraints

Collect metrics about detected variances constraints on formal types.
module div_by_zero

nitc :: div_by_zero

Detection of divisions by zero in obvious cases
module dom

dom :: dom

Easy XML DOM parser
module dynamic

json :: dynamic

Dynamic interface to read values from JSON strings
module dynamic_loading_ffi

nitc :: dynamic_loading_ffi

Execute FFI code by creating and loading shared libraries
module dynamic_resolution

gamnit :: dynamic_resolution

Virtual screen with a resolution independent from the real screen
module emscripten

nitc :: emscripten

Compile to JavaScript using the Emscripten SDK
module error

json :: error

Intro JsonParseError which is exposed by all JSON reading APIs
module error

neo4j :: error

Errors thrown by the neo4j library.
module events

github :: events

Events are emitted by Github Hooks.
module example_angular

popcorn :: example_angular

This is an example of how to use angular.js with popcorn
module explain_assert

nitc :: explain_assert

Explain failed assert to the console by modifying the AST.
module ext

msgpack :: ext

Application specific MessagePack extension MsgPackExt
module extern_classes

nitc :: extern_classes

Manages all extern classes and their associated foreign type.
module extra_java_files

nitc :: extra_java_files

Intro the annotation extra_java_files to compile extra java files
module ffi

nitc :: ffi

Full FFI support, independent of the compiler
module ffi_base

nitc :: ffi_base

Tools and utilities for implement FFI with different languages
module file_server

nitcorn :: file_server

Provides the FileServer action, which is a standard and minimal file server
module flat

gamnit :: flat

Simple API for 2D games, built around Sprite and App::update
module flat_core

gamnit :: flat_core

Core services for the flat API for 2D games
module flow

nitc :: flow

Intraprocedural static flow.
module font

gamnit :: font

Abstract font drawing services, implemented by bmfont and tileset
module frontend

nitc :: frontend

Collect and orchestration of main frontend phases
module gamnit

gamnit :: gamnit

Game and multimedia framework for Nit
module gamnit_android

gamnit :: gamnit_android

Support services for Gamnit on Android
module gamnit_ios

gamnit :: gamnit_ios

Support services for gamnit on iOS
module gamnit_linux

gamnit :: gamnit_linux

Support services for Gamnit on GNU/Linux
module generate_hierarchies

nitc :: generate_hierarchies

Create dot files for various hierarchies of a model.
module geometry

geometry :: geometry

Provides interfaces and classes to represent basic geometry needs.
module github

github :: github

Nit wrapper for Github API
module global_compiler

nitc :: global_compiler

Global compilation of a Nit program
module glsl_validation

nitc :: glsl_validation

Check shader code within Nit modules using the tool glslangValidator
module graph

neo4j :: graph

Provides an interface for services on a Neo4j graphs.
module header_dependency

nitc :: header_dependency

Tracks which modules has public header code that must be imported
module highlight

nitc :: highlight

Highlighting of Nit AST
module hooks

github :: hooks

Github hook event listening with nitcorn.
module htcpcp_server

nitcorn :: htcpcp_server

A server that implements HTCPCP. At the moment there are no additions.
module html_commands

nitc :: html_commands

Render commands results as HTML
module html_model

nitc :: html_model

Translate mentities to html blocks.
module htmlight

nitc :: htmlight

Highlighting of Nit AST with HTML
module http_errors

nitcorn :: http_errors

Offers ErrorTemplate to display error pages
module http_request

ios :: http_request

Implementation of app::http_request for iOS
module http_request

nitcorn :: http_request

Provides the HttpRequest class and services to create it
module http_request

app :: http_request

HTTP request services: AsyncHttpRequest and Text::http_get
module http_request

linux :: http_request

Implementation of app::http_request using GDK and Curl
module http_request

android :: http_request

Android implementation of app:http_request
module http_request_example

app :: http_request_example

Example for the app::http_request main service AsyncHttpRequest
module http_response

nitcorn :: http_response

Provides the HttpResponse class and http_status_codes
module i18n_phase

nitc :: i18n_phase

Basic support of internationalization through the generation of id-to-string tables
module inheritance_metrics

nitc :: inheritance_metrics

Collect metrics about inheritance usage
module input_ios

gamnit :: input_ios

Gamnit event support for iOS
module intent

android :: intent

Services allowing to launch activities and start/stop services using
module intent_api10

android :: intent_api10

Services allowing to launch activities and start/stop services using
module intent_api11

android :: intent_api11

Refines intent module to add API 11 services
module intent_api12

android :: intent_api12

Refines intent module to add API 12 services
module intent_api14

android :: intent_api14

Refines intent module to add API 14 services
module intent_api15

android :: intent_api15

Refines intent module to add API 15 services
module intent_api16

android :: intent_api16

Refines intent module to add API 16 services
module intent_api17

android :: intent_api17

Refines intent module to add API 17 services
module intent_api18

android :: intent_api18

Refines intent module to add API 18 services
module intent_api19

android :: intent_api19

Refines intent module to add API 19 services
module interpreter

nitc :: interpreter

Interpretation of Nit programs
module ios

nitc :: ios

Compile programs for the iOS platform
module java

nitc :: java

FFI support for the Java language
module java_compiler

nitc :: java_compiler

Compile Nit code to Java code
module json

json :: json

Read and write JSON formatted text using the standard serialization services
module json_commands

nitc :: json_commands

Translate command results to json
module json_graph_store

neo4j :: json_graph_store

Provides JSON as a mean to store graphs.
module json_model

nitc :: json_model

Make model entities Serializable.
module keys

gamnit :: keys

Simple service keeping track of which keys are currently pressed
module light

nitc :: light

Light FFI support for the compiler
module light_c

nitc :: light_c

Support for nesting C code within a Nit program using its FFI
module light_ffi

nitc :: light_ffi

Light FFI support, independent of the compiler
module light_ffi_base

nitc :: light_ffi_base

Tools and utilities for implement FFI with different languages
module light_only

nitc :: light_only

Compiler support for the light FFI only, detects unsupported usage of callbacks
module limit_fps

gamnit :: limit_fps

Frame-rate control for applications
module literal

nitc :: literal

Parsing of literal values in the abstract syntax tree.
module loader

nitc :: loader

Loading of Nit source files
module loader

github :: loader

module local_var_init

nitc :: local_var_init

Verify that local variables are initialized before their usage
module log

nitcorn :: log

Services inserting a timestamp in all prints and to log each requests
module mclasses_metrics

nitc :: mclasses_metrics

Collect common metrics about mclasses
module md_commands

nitc :: md_commands

Render commands results as Markdown
module memory_logger

nitc :: memory_logger

Extension to inject memory-tracing instrumentation in code generated by nitc.
module mendel_metrics

nitc :: mendel_metrics

The Mendel model helps to understand class hierarchies.
module metrics

nitc :: metrics

Various statistics about Nit models and programs
module metrics_base

nitc :: metrics_base

Helpers for various statistics tools.
module mixin

nitc :: mixin

Loading and additional module refinements at link-time.
module mmodule

nitc :: mmodule

modules and module hierarchies in the metamodel
module mmodule_data

nitc :: mmodule_data

Define and retrieve data in modules
module mmodules_metrics

nitc :: mmodules_metrics

Collect common metrics about modules
module model

nitc :: model

Classes, types and properties
module model_collect

nitc :: model_collect

Collect things from the model.
module model_dimensions

gamnit :: model_dimensions

Dimensions related services for Model and Mesh
module model_examples

nitc :: model_examples

Examples for Model entities
module model_ext

nitc :: model_ext

Extensions to the Nit model for foreign languages.
module model_hyperdoc

nitc :: model_hyperdoc

Dump of Nit model into hypertext human-readable format.
module model_index

nitc :: model_index

Search things from the Model
module model_parser_base

gamnit :: model_parser_base

Services to parse models from a text description
module model_visitor

nitc :: model_visitor

Simple visitor framework for Nit models.
module model_viz

nitc :: model_viz

Visualisation of Nit models
module modelbuilder_base

nitc :: modelbuilder_base

Load nit source files and build the associated model
module modelize

nitc :: modelize

Create a model from nit source files
module modelize_class

nitc :: modelize_class

Analysis and verification of class definitions to instantiate model element
module modelize_property

nitc :: modelize_property

Analysis and verification of property definitions to instantiate model element
module mongodb

mongodb :: mongodb

MongoDB Nit Driver.
module more_collections

more_collections :: more_collections

Highly specific, but useful, collections-related classes.
module more_lights

gamnit :: more_lights

More implementations of Light
module more_materials

gamnit :: more_materials

Various material implementations
module more_meshes

gamnit :: more_meshes

More simple geometric meshes
module more_models

gamnit :: more_models

Services to load models from the assets folder
module mpackage

nitc :: mpackage

Modelisation of a Nit package
module mpi

mpi :: mpi

Implementation of the Message Passing Interface protocol by wrapping OpenMPI
module msgpack

msgpack :: msgpack

MessagePack, an efficient binary serialization format
module msgpack_to_json

msgpack :: msgpack_to_json

Convert MessagePack format to JSON
module mtl

gamnit :: mtl

Services to parse .mtl material files
module naive_interpreter

nitc :: naive_interpreter

Interpretation of a Nit program directly on the AST
module native_ui

android :: native_ui

Native services from the android.view and android.widget namespaces
module neo

nitc :: neo

Save and load a Model to/from a Neo4j graph.
module neo4j

neo4j :: neo4j

Neo4j connector through its JSON REST API using curl.
module network

gamnit :: network

Easy client/server logic for games and simple distributed applications
module nit

nitc :: nit

A naive Nit interpreter
module nit_activity

android :: nit_activity

Core implementation of app.nit on Android using a custom Java entry point
module nitc

nitc :: nitc

A Nit compiler
module nitcatalog

nitc :: nitcatalog

Basic catalog generator for Nit packages
module nitcc_runtime

nitcc_runtime :: nitcc_runtime

Runtime library required by parsers and lexers generated by nitcc
module nitcorn

nitcorn :: nitcorn

The nitcorn Web server framework creates server-side Web apps in Nit
module nitcorn_hello_world

nitcorn :: nitcorn_hello_world

Hello World Web server example
module nitcorn_reverse_proxy

nitcorn :: nitcorn_reverse_proxy

Minimal example using a ProxyAction
module nitdoc

nitc :: nitdoc

Generator of static API documentation for the Nit language
module nith

nitc :: nith

A ligHt Nit compiler
module nitj

nitc :: nitj

Compile Nit into Java code runnable on the Java Virtual Machine.
module nitlight

nitc :: nitlight

Tool that produces highlighting for Nit programs
module nitls

nitc :: nitls

Simple tool to list Nit source files
module nitmetrics

nitc :: nitmetrics

A program that collects various metrics on nit programs and libraries
module nitni

nitc :: nitni

Native interface related services (used underneath the FFI)
module nitni_base

nitc :: nitni_base

Native interface related services (used underneath the FFI)
module nitni_callbacks

nitc :: nitni_callbacks

nitni services related to callbacks (used underneath the FFI)
module nitpackage

nitc :: nitpackage

Helpful features about packages
module nitpick

nitc :: nitpick

A program that collect potential style and code issues
module nitpretty

nitc :: nitpretty

module nitrestful

nitc :: nitrestful

Tool generating boilerplate code linking RESTful actions to Nit methods
module nitsaf

nitc :: nitsaf

Nit Static Analysis Framework client example.
module nitserial

nitc :: nitserial

Serialization support compiler, a tool to support deserialization of live generic types
module nitsmells

nitc :: nitsmells

module nituml

nitc :: nituml

UML generator in dot format.
module nitunit

nitc :: nitunit

Testing tool.
module nitvm

nitc :: nitvm

The Nit virtual machine launcher
module nitweb

nitc :: nitweb

Runs a webserver based on nitcorn that render things from model.
module nitx

nitc :: nitx

nitx, a command tool that displays useful data about Nit code
module nlp

nlp :: nlp

Natural Language Processor based on the StanfordNLP core.
module nlp_index

nlp :: nlp_index

Example showing how to use a NLPFileIndex.
module no_warning

nitc :: no_warning

Fill toolcontext information about blacklisting of warnings.
module noise

noise :: noise

Noise generators PerlinNoise and InterpolatedNoise
module nullables_metrics

nitc :: nullables_metrics

Statistics about the usage of nullables
module obj

gamnit :: obj

Services to parse .obj geometry files
module objc

nitc :: objc

FFI support for Objective-C
module on_demand_compiler

nitc :: on_demand_compiler

Compiles extern code within a module to a static library, as needed
module parallelization_phase

nitc :: parallelization_phase

Phase generating threads for functions annotated with threaded annotation
module parse_annotations

nitc :: parse_annotations

Simple annotation parsing
module parser

dom :: parser

XML DOM-parsing facilities
module parser_base

parser_base :: parser_base

Simple base for hand-made parsers of all kinds
module parser_util

nitc :: parser_util

Utils and tools related to parsers and AST
module particles

gamnit :: particles

Particle effects
module phase

nitc :: phase

Phases of the processing of nit programs
module pkgconfig

nitc :: pkgconfig

Offers the PkgconfigPhase to use the external program "pkg-config" in order
module platform

nitc :: platform

Platform system, used to customize the behavior of the compiler.
module points_and_lines

geometry :: points_and_lines

Interfaces and classes to represent basic geometry needs.
module polygon

geometry :: polygon

Convex Polygons manipulations
module pop_auth

popcorn :: pop_auth

Authentification handlers.
module pop_handlers

popcorn :: pop_handlers

Route handlers.
module pop_json

popcorn :: pop_json

Introduce useful services for JSON REST API handlers.
module pop_repos

popcorn :: pop_repos

Repositories for data management.
module pop_routes

popcorn :: pop_routes

Internal routes representation.
module pop_sessions

popcorn :: pop_sessions

Session handlers
module pop_tasks

popcorn :: pop_tasks

Popcorn threaded tasks
module pop_templates

popcorn :: pop_templates

Template rendering for popcorn
module pop_tests

popcorn :: pop_tests

Popcorn testing services
module pop_validation

popcorn :: pop_validation

Quick and easy validation framework for Json inputs
module popcorn

popcorn :: popcorn

Application server abstraction on top of nitcorn.
module poset_metrics

nitc :: poset_metrics

Metrics about the various posets of the model of a Nit program
module pretty

nitc :: pretty

Library used to pretty print Nit code.
module programs

gamnit :: programs

Services for graphical programs with shaders, attributes and uniforms
module proxy

nitcorn :: proxy

Provides the ProxyAction action, which redirects requests to another interface
module pthreads

nitcorn :: pthreads

Activate the use of pthreads with nitcorn
module quadtree

geometry :: quadtree

QuadTree API mostly used for 2 dimensional collision detection
module queries

mongodb :: queries

Mongo queries framework
module rapid_type_analysis

nitc :: rapid_type_analysis

Rapid type analysis on the AST
module reactor

nitcorn :: reactor

Core of the nitcorn project, provides HttpFactory and Action
module read

msgpack :: read

Low-level read MessagePack format from Reader streams
module readme_metrics

nitc :: readme_metrics

Collect common metrics about README files
module refinement_metrics

nitc :: refinement_metrics

Collect metrics about refinement usage
module regex_phase

nitc :: regex_phase

Check for error in regular expressions from string literals
module restful

nitcorn :: restful

Support module for the nitrestful tool and the restful annotation
module restful_annot

nitcorn :: restful_annot

Example for the restful annotation documented at lib/nitcorn/restful.nit
module rta_metrics

nitc :: rta_metrics

Metrics from RTA
module saf

nitc :: saf

Nit Static Analysis Framework.
module saf_base

nitc :: saf_base

Static Analysis Framework base
module safe

serialization :: safe

Services for safer deserialization engines
module scope

nitc :: scope

Identification and scoping of local variables and labels.
module selection

gamnit :: selection

Select Actor from a screen coordinate
module self_metrics

nitc :: self_metrics

Metrics about the usage of explicit and implicit self
module semantize

nitc :: semantize

Process bodies of methods in regard with the model.
module sensors

android :: sensors

Access Android sensors
module separate_compiler

nitc :: separate_compiler

Separate compilation of a Nit program
module separate_erasure_compiler

nitc :: separate_erasure_compiler

Separate compilation of a Nit program with generic type erasure
module sequential_id

neo4j :: sequential_id

Provides a sequential identification scheme for Neo4j nodes.
module serialization_code_gen_phase

nitc :: serialization_code_gen_phase

Phase generating methods (code) to serialize Nit objects
module serialization_model_phase

nitc :: serialization_model_phase

Phase generating methods (model-only) to serialize Nit objects
module serialization_read

msgpack :: serialization_read

Deserialize full Nit objects from MessagePack format
module serialization_read

json :: serialization_read

Services to read JSON: deserialize_json and JsonDeserializer
module serialization_write

msgpack :: serialization_write

Serialize full Nit objects to MessagePack format
module serialize_model

nitc :: serialize_model

Service to serialize POSet to JSON
module server

gamnit :: server

Server-side network services for games and such
module service

android :: service

Android service support for app.nit centered around the class Service
module sessions

nitcorn :: sessions

Automated session management
module sexp

sexp :: sexp

S-Expression parsing facilities
module shadow

gamnit :: shadow

Shadow mapping using a depth texture
module shared_preferences

android :: shared_preferences

Services allowing to save and load datas to internal android device
module shared_preferences_api10

android :: shared_preferences_api10

Services to save/load data using android.content.SharedPreferences for the android platform
module shared_preferences_api11

android :: shared_preferences_api11

Refines shared_preferences module to add API 11 services
module signal_handler

nitcorn :: signal_handler

Handle SIGINT and SIGTERM to close the server after all active events
module simple_file_server

nitcorn :: simple_file_server

Basic file server on port 80 by default, may require root to execute
module simple_misc_analysis

nitc :: simple_misc_analysis

Simple vavious processing on a AST
module ssa

nitc :: ssa

Single-Static Assignment algorithm from an AST
module stanford

nlp :: stanford

Natural Language Processor based on the StanfordNLP core.
module static

nitc :: static

Nitdoc generation framework
module static

json :: static

Static interface to read Nit objects from JSON strings
module static_base

nitc :: static_base

Base entities shared by all the nitdoc code
module static_cards

nitc :: static_cards

Cards templates for the static documentation
module static_html

nitc :: static_html

Render documentation pages as HTML
module static_index

nitc :: static_index

Manage indexing of Nit model for Nitdoc QuickSearch.
module static_structure

nitc :: static_structure

Composes the pages of the static documentation
module static_types_metrics

nitc :: static_types_metrics

Metrics on the usage of explicit static types.
module stereoscopic_view

gamnit :: stereoscopic_view

Refine EulerCamera and App::frame_core_draw to get a stereoscopic view
module store

json :: store

Store and load json data.
module tables_metrics

nitc :: tables_metrics

Metrics on table generation
module term

nitc :: term

module term_model

nitc :: term_model

Markdown templates for Nit model MEntities.
module test_astbuilder

nitc :: test_astbuilder

Program used to test the clone method of the astbuilder tool
module test_highlight

nitc :: test_highlight

Program used to test the Nit highlighter
module test_model_visitor

nitc :: test_model_visitor

Example of model_visitor
module test_neo

nitc :: test_neo

Test for neo model saving and loading.
module test_parser

nitc :: test_parser

Program used to test the NIT parser
module test_phase

nitc :: test_phase

Stub for loading a runing phases on a bunch of modules
module test_test_phase

nitc :: test_test_phase

Example of simple module that aims to do some specific work on nit programs.
module test_toolcontext

nitc :: test_toolcontext

Program used to test ToolContext
module testing

nitc :: testing

Test unit generation and execution for Nit.
module testing_base

nitc :: testing_base

Base options for testing tools.
module testing_doc

nitc :: testing_doc

Testing from code comments.
module testing_gen

nitc :: testing_gen

Test Suites generation.
module testing_suite

nitc :: testing_suite

Testing from external files.
module texture_atlas_parser

gamnit :: texture_atlas_parser

Tool to parse XML texture atlas and generated Nit code to access subtextures
module tileset

gamnit :: tileset

Support for TileSet, TileSetFont and drawing text with TextSprites
module toolcontext

nitc :: toolcontext

Common command-line tool infrastructure than handle options and error messages
module transform

nitc :: transform

Thansformations that simplify the AST of expressions
module typing

nitc :: typing

Intraprocedural resolution of static types and OO-services
module ui

android :: ui

Views and services to use the Android native user interface
module ui

linux :: ui

Implementation of the app.nit UI module for GNU/Linux
module ui_example

app :: ui_example

User interface example using app::ui
module ui_test

android :: ui_test

Test for app.nit's UI services
module uml

nitc :: uml

Group head module for UML generation services
module uml_base

nitc :: uml_base

Exposes the base class for UML generation of a Model
module uml_class

nitc :: uml_class

Provides facilities of exporting a Model to a UML class diagram
module uml_module

nitc :: uml_module

Services for generation of a UML package diagram based on a Model
module vararg_routes

nitcorn :: vararg_routes

Routes with parameters.
module variables_numbering

nitc :: variables_numbering

Handle all numbering operations related to local variables in the Nit virtual machine
module vim_autocomplete

nitc :: vim_autocomplete

Generate files used by the Vim plugin to autocomplete with doc
module virtual_gamepad

gamnit :: virtual_gamepad

Virtual gamepad mapped to keyboard keys for quick and dirty mobile support
module virtual_machine

nitc :: virtual_machine

Implementation of the Nit virtual machine
module vm

nitc :: vm

Entry point of all vm components
module vm_optimizations

nitc :: vm_optimizations

Optimization of the nitvm
module vr

gamnit :: vr

VR support for gamnit depth, for Android only
module wallet

github :: wallet

Github OAuth tokens management
module wifi

android :: wifi

Simple wrapper of the Android WiFi services
module xcode_templates

nitc :: xcode_templates

Templates and other services to create XCode projects
module xml_entities

dom :: xml_entities

Basic blocks for DOM-XML representation
# Refine `Serializable::inspect` to show more useful information
module inspect

import serialization_core
private import caching

private fun inspect_testing: Bool do return "NIT_TESTING".environ == "true"

# Serialization engine writing the object attributes to strings
private class InspectSerializer
	super CachingSerializer

	# Target writing stream
	var stream: Writer

	redef var current_object = null

	var first_object: nullable Object = null

	redef fun serialize(object)
	do
		if object == null then
			stream.write "null"
		else
			if current_object == null then
				first_object = object
			end

			var last_object = current_object
			current_object = object
			object.accept_inspect_serializer self
			current_object = last_object
		end
	end

	var first_attribute_serialized = false

	redef fun serialize_attribute(name, value)
	do
		if first_attribute_serialized then
			stream.write ", "
		else
			stream.write " "
			first_attribute_serialized = true
		end

		stream.write name
		stream.write ":"

		super
	end

	redef fun serialize_reference(object)
	do
		if cache.has_object(object) then
			# Cycle
			var id = object.object_id
			if inspect_testing then id = cache.id_for(object)

			stream.write "<"
			stream.write object.class_name
			stream.write "#"
			stream.write id.to_s
			stream.write ">"
		else if object != first_object and (not object isa DirectSerializable) then
			# Another object, print class and id only
			var id = object.object_id
			if inspect_testing then id = cache.new_id_for(object)

			stream.write "<"
			stream.write object.class_name
			stream.write "#"
			stream.write id.to_s
			stream.write ">"
		else
			# Main object
			serialize object
		end
	end
end

redef class Serializable

	# Improve the default inspection reading serializable attributes
	#
	# Simple immutable data are inspected as they would be written in Nit code.
	#
	# ~~~
	# assert 123.inspect == "123"
	# assert 1.5.inspect == "1.5"
	# assert 0xa1u8.inspect == "0xa1u8"
	# assert 'c'.inspect == "'c'"
	# assert "asdf\n".inspect == "\"asdf\\n\""
	# ~~~
	#
	# Inspections of mutable serializable objects show their dynamic type,
	# their `object_id` and their first level attributes. When testing,
	# the `object_id` is replaced by an id unique to each call to `inspect`.
	#
	# ~~~
	# class MyClass
	#     serialize
	#
	#     var i: Int
	#     var o: nullable Object
	# end
	#
	# var class_with_null = new MyClass(123)
	# assert class_with_null.to_s == class_with_null.inspect
	# assert class_with_null.to_s == "<MyClass#0 i:123, o:null>"
	#
	# var class_with_other = new MyClass(456, class_with_null)
	# assert class_with_other.to_s == "<MyClass#0 i:456, o:<MyClass#1>>"
	#
	# var class_with_cycle = new MyClass(789)
	# class_with_cycle.o = class_with_cycle
	# assert class_with_cycle.to_s == "<MyClass#0 i:789, o:<MyClass#0>>"
	# ~~~
	#
	# Items of collections are flattened and appended to the output.
	#
	# ~~~
	# assert [1, 2, 3].inspect == "<Array[Int]#0 [1, 2, 3]>"
	#
	# var set = new HashSet[Object].from([1, 1.5, "two": Object])
	# assert set.inspect == """<HashSet[Object]#0 [1, 1.5, "two"]>"""
	#
	# var map = new Map[Int, String]
	# map[1] = "one"
	# map[2] = "two"
	# assert map.inspect == """<HashMap[Int, String]#0 {1:"one", 2:"two"}>"""
	# ~~~
	#
	# Inspections producing over 80 characters are cut short.
	#
	# ~~~
	# var long_class = new MyClass(123456789, "Some " + "very "*8 + "long string")
	# assert long_class.to_s == "<MyClass#0 i:123456789, o:\"Some very very very very very very very very long s…>"
	# ~~~
	redef fun inspect
	do
		var stream = new StringWriter
		var serializer = new InspectSerializer(stream)
		serializer.serialize self
		stream.close
		var str = stream.to_s

		# Cut long inspects
		var max_length = 80
		if str.length > max_length then
			str = str.substring(0, max_length-2) + "…>"
		end

		return str
	end

	private fun accept_inspect_serializer(v: InspectSerializer)
	do
		v.stream.write "<"

		v.stream.write class_name
		v.stream.write "#"

		var id = object_id
		if inspect_testing then id = v.cache.new_id_for(self)
		v.stream.write id.to_s

		accept_inspect_serializer_core v

		v.stream.write ">"
	end

	private fun accept_inspect_serializer_core(v: InspectSerializer)
	do v.serialize_core(self)
end

redef class Int
	redef fun accept_inspect_serializer(v) do v.stream.write to_s
end

redef class Float
	redef fun accept_inspect_serializer(v) do v.stream.write to_s
end

redef class Bool
	redef fun accept_inspect_serializer(v) do v.stream.write to_s
end

redef class Char
	redef fun accept_inspect_serializer(v)
	do
		v.stream.write "'"
		v.stream.write to_s.escape_to_nit
		v.stream.write "'"
	end
end

redef class Byte
	redef fun accept_inspect_serializer(v)
	do
		v.stream.write to_s
		v.stream.write "u8"
	end
end

redef class CString
	redef fun accept_inspect_serializer_core(v)
	do
		v.stream.write " \""
		v.stream.write to_s.escape_to_nit
		v.stream.write_char '"'
	end
end

redef class Text

	redef fun accept_inspect_serializer(v)
	do
		v.stream.write "\""
		v.stream.write escape_to_nit
		v.stream.write "\""
	end
end

redef class Collection[E]
	private fun serialize_as_inspect(v: InspectSerializer)
	do
		v.stream.write "["
		var is_first = true
		for e in self do
			if is_first then
				is_first = false
			else
				v.stream.write ", "
			end

			if not v.try_to_serialize(e) then
				assert e != null
				v.stream.write e.inspect
			end
		end
		v.stream.write "]"
	end
end

redef class SimpleCollection[E]
	redef fun accept_inspect_serializer_core(v)
	do
		v.stream.write " "
		serialize_as_inspect v
	end
end

redef class Map[K, V]
	redef fun accept_inspect_serializer_core(v)
	do
		v.stream.write " \{"

		var first = true
		for key, val in self do
			if not first then
				v.stream.write ", "
			else first = false

			if not v.try_to_serialize(key) then
				assert key != null
				v.stream.write key.inspect
			end

			v.stream.write ":"

			if not v.try_to_serialize(val) then
				assert val != null
				v.stream.write val.inspect
			end
		end

		v.stream.write "\}"
	end
end
lib/serialization/inspect.nit:15,1--294,3