Metadata associated to an Android project

Introduced properties

private var _activities: Array[String]

nitc :: AndroidProject :: _activities

Activities to declare in the manifest
private var _manifest_activity_attributes: Array[String]

nitc :: AndroidProject :: _manifest_activity_attributes

Custom lines to add to AndroidManifest.xml as attributes inside the node
private var _manifest_application_lines: Array[String]

nitc :: AndroidProject :: _manifest_application_lines

Custom lines to add to the AndroidManifest.xml in the node
private var _manifest_lines: Array[String]

nitc :: AndroidProject :: _manifest_lines

Custom lines to add to the AndroidManifest.xml in the node
private var _max_api: nullable Int

nitc :: AndroidProject :: _max_api

Maximum API level on which the application will be allowed to run
private var _min_api: nullable Int

nitc :: AndroidProject :: _min_api

Minimum API level required for the application to run
private var _target_api: nullable Int

nitc :: AndroidProject :: _target_api

Build target API level
fun activities: Array[String]

nitc :: AndroidProject :: activities

Activities to declare in the manifest
protected fun activities=(activities: Array[String])

nitc :: AndroidProject :: activities=

Activities to declare in the manifest
init defaultinit(modelbuilder: ModelBuilder, mainmodule: MModule)

nitc :: AndroidProject :: defaultinit

fun manifest_activity_attributes: Array[String]

nitc :: AndroidProject :: manifest_activity_attributes

Custom lines to add to AndroidManifest.xml as attributes inside the node
protected fun manifest_activity_attributes=(manifest_activity_attributes: Array[String])

nitc :: AndroidProject :: manifest_activity_attributes=

Custom lines to add to AndroidManifest.xml as attributes inside the node
fun manifest_application_lines: Array[String]

nitc :: AndroidProject :: manifest_application_lines

Custom lines to add to the AndroidManifest.xml in the node
protected fun manifest_application_lines=(manifest_application_lines: Array[String])

nitc :: AndroidProject :: manifest_application_lines=

Custom lines to add to the AndroidManifest.xml in the node
fun manifest_lines: Array[String]

nitc :: AndroidProject :: manifest_lines

Custom lines to add to the AndroidManifest.xml in the node
protected fun manifest_lines=(manifest_lines: Array[String])

nitc :: AndroidProject :: manifest_lines=

Custom lines to add to the AndroidManifest.xml in the node
fun max_api: nullable Int

nitc :: AndroidProject :: max_api

Maximum API level on which the application will be allowed to run
protected fun max_api=(max_api: nullable Int)

nitc :: AndroidProject :: max_api=

Maximum API level on which the application will be allowed to run
fun min_api: nullable Int

nitc :: AndroidProject :: min_api

Minimum API level required for the application to run
protected fun min_api=(min_api: nullable Int)

nitc :: AndroidProject :: min_api=

Minimum API level required for the application to run
fun target_api: nullable Int

nitc :: AndroidProject :: target_api

Build target API level
protected fun target_api=(target_api: nullable Int)

nitc :: AndroidProject :: target_api=

Build target API level

Redefined properties

redef type SELF: AndroidProject

nitc $ AndroidProject :: SELF

Type of this instance, automatically specialized in every class
redef init init

nitc $ AndroidProject :: init

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
private var _activities: Array[String]

nitc :: AndroidProject :: _activities

Activities to declare in the manifest
private var _files: Array[String]

nitc :: AppProject :: _files

Extra folders where to find platform specific resource files
private var _manifest_activity_attributes: Array[String]

nitc :: AndroidProject :: _manifest_activity_attributes

Custom lines to add to AndroidManifest.xml as attributes inside the node
private var _manifest_application_lines: Array[String]

nitc :: AndroidProject :: _manifest_application_lines

Custom lines to add to the AndroidManifest.xml in the node
private var _manifest_lines: Array[String]

nitc :: AndroidProject :: _manifest_lines

Custom lines to add to the AndroidManifest.xml in the node
private var _max_api: nullable Int

nitc :: AndroidProject :: _max_api

Maximum API level on which the application will be allowed to run
private var _min_api: nullable Int

nitc :: AndroidProject :: _min_api

Minimum API level required for the application to run
private var _name: String

nitc :: AppProject :: _name

Pretty name of the resulting application
private var _namespace: String

nitc :: AppProject :: _namespace

Namespace/package used to identify the application
private var _short_name: String

nitc :: AppProject :: _short_name

Short project name used in namespace and configuration files
private var _target_api: nullable Int

nitc :: AndroidProject :: _target_api

Build target API level
private var _version: String

nitc :: AppProject :: _version

Version of the application
private var _version_code: Int

nitc :: AppProject :: _version_code

Numerical version code of the application
fun activities: Array[String]

nitc :: AndroidProject :: activities

Activities to declare in the manifest
protected fun activities=(activities: Array[String])

nitc :: AndroidProject :: activities=

Activities to declare in the manifest
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.
init defaultinit(modelbuilder: ModelBuilder, mainmodule: MModule)

nitc :: AndroidProject :: defaultinit

init defaultinit(modelbuilder: ModelBuilder, mainmodule: MModule)

nitc :: AppProject :: defaultinit

fun files: Array[String]

nitc :: AppProject :: files

Extra folders where to find platform specific resource files
protected fun files=(files: Array[String])

nitc :: AppProject :: files=

Extra folders where to find platform specific resource files
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
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".
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.
private fun mainmodule=(mainmodule: MModule)

nitc :: AppProject :: mainmodule=

fun manifest_activity_attributes: Array[String]

nitc :: AndroidProject :: manifest_activity_attributes

Custom lines to add to AndroidManifest.xml as attributes inside the node
protected fun manifest_activity_attributes=(manifest_activity_attributes: Array[String])

nitc :: AndroidProject :: manifest_activity_attributes=

Custom lines to add to AndroidManifest.xml as attributes inside the node
fun manifest_application_lines: Array[String]

nitc :: AndroidProject :: manifest_application_lines

Custom lines to add to the AndroidManifest.xml in the node
protected fun manifest_application_lines=(manifest_application_lines: Array[String])

nitc :: AndroidProject :: manifest_application_lines=

Custom lines to add to the AndroidManifest.xml in the node
fun manifest_lines: Array[String]

nitc :: AndroidProject :: manifest_lines

Custom lines to add to the AndroidManifest.xml in the node
protected fun manifest_lines=(manifest_lines: Array[String])

nitc :: AndroidProject :: manifest_lines=

Custom lines to add to the AndroidManifest.xml in the node
fun max_api: nullable Int

nitc :: AndroidProject :: max_api

Maximum API level on which the application will be allowed to run
protected fun max_api=(max_api: nullable Int)

nitc :: AndroidProject :: max_api=

Maximum API level on which the application will be allowed to run
fun min_api: nullable Int

nitc :: AndroidProject :: min_api

Minimum API level required for the application to run
protected fun min_api=(min_api: nullable Int)

nitc :: AndroidProject :: min_api=

Minimum API level required for the application to run
private fun modelbuilder=(modelbuilder: ModelBuilder)

nitc :: AppProject :: modelbuilder=

fun name: String

nitc :: AppProject :: name

Pretty name of the resulting application
protected fun name=(name: String)

nitc :: AppProject :: name=

Pretty name of the resulting application
fun namespace: String

nitc :: AppProject :: namespace

Namespace/package used to identify the application
protected fun namespace=(namespace: String)

nitc :: AppProject :: namespace=

Namespace/package used to identify the application
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
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
fun short_name: String

nitc :: AppProject :: short_name

Short project name used in namespace and configuration files
protected fun short_name=(short_name: String)

nitc :: AppProject :: short_name=

Short project name used in namespace and configuration files
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun target_api: nullable Int

nitc :: AndroidProject :: target_api

Build target API level
protected fun target_api=(target_api: nullable Int)

nitc :: AndroidProject :: target_api=

Build target API level
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun version: String

nitc :: AppProject :: version

Version of the application
protected fun version=(version: String)

nitc :: AppProject :: version=

Version of the application
fun version_code: Int

nitc :: AppProject :: version_code

Numerical version code of the application
protected fun version_code=(version_code: Int)

nitc :: AppProject :: version_code=

Numerical version code of the application
package_diagram nitc::AndroidProject AndroidProject nitc::AppProject AppProject nitc::AndroidProject->nitc::AppProject core::Object Object nitc::AppProject->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

class AppProject

nitc :: AppProject

Metadata associated to an app.nit project

Class definitions

nitc $ AndroidProject
# Metadata associated to an Android project
class AndroidProject
	super AppProject

	# Custom lines to add to the AndroidManifest.xml in the <manifest> node
	var manifest_lines = new Array[String]

	# Custom lines to add to the AndroidManifest.xml in the <application> node
	var manifest_application_lines = new Array[String]

	# Custom lines to add to AndroidManifest.xml as attributes inside the <activity> node
	var manifest_activity_attributes = new Array[String]

	# Minimum API level required for the application to run
	var min_api: nullable Int = null

	# Build target API level
	var target_api: nullable Int = null

	# Maximum API level on which the application will be allowed to run
	var max_api: nullable Int = null

	# Activities to declare in the manifest
	var activities = new Array[String]

	init
	do
		var annots = modelbuilder.collect_annotations_on_modules("android_api_min", mainmodule)
		if not annots.is_empty then
			var i = annots.pop.arg_as_int(modelbuilder)
			if i == null then i = 0
			min_api = i
			for an in annots do
				i = an.arg_as_int(modelbuilder)
				if i == null then continue
				min_api = min_api.max(i)
			end
		end

		annots = modelbuilder.collect_annotations_on_modules("android_api_max", mainmodule)
		if not annots.is_empty then
			var i = annots.pop.arg_as_int(modelbuilder)
			if i == null then i = 0
			max_api = i
			for an in annots do
				i = an.arg_as_int(modelbuilder)
				if i == null then continue
				max_api = max_api.min(i)
			end
		end

		var annot = modelbuilder.lookup_annotation_on_modules("android_api_target", mainmodule)
		if annot != null then target_api = annot.arg_as_int(modelbuilder) or else 0

		annots = modelbuilder.collect_annotations_on_modules("android_manifest", mainmodule)
		for an in annots do manifest_lines.add an.arg_as_string(modelbuilder) or else ""

		annots = modelbuilder.collect_annotations_on_modules("android_manifest_application", mainmodule)
		for an in annots do manifest_application_lines.add an.arg_as_string(modelbuilder) or else ""

		annots = modelbuilder.collect_annotations_on_modules("android_manifest_activity", mainmodule)
		for an in annots do manifest_activity_attributes.add an.arg_as_string(modelbuilder) or else ""

		annots = modelbuilder.collect_annotations_on_modules("android_activity", mainmodule)
		for an in annots do
			var activity = an.arg_as_string(modelbuilder)
			if activity != null then activities.add activity
		end
	end
end
src/platform/android_annotations.nit:22,1--91,3