Class: Android::Manifest::QueriesComponent

Inherits:
Object
  • Object
show all
Defined in:
lib/android/manifest.rb

Overview

<intent>, <service>, <receiver> or <provider> element in <application> element of the manifest file.

Direct Known Subclasses

Queries

Constant Summary collapse

TYPES =

component types

['package', 'intent', 'provider']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ QueriesComponent

Returns a new instance of QueriesComponent.

Parameters:

  • elem (REXML::Element)

    target element

Raises:

  • (ArgumentError)

    when elem is invalid.



343
344
345
346
347
348
349
350
351
# File 'lib/android/manifest.rb', line 343

def initialize(elem)
  raise ArgumentError unless Component.valid?(elem)

  @elem = elem
  @type = elem.name
  @packages = parse_packages
  @intents = parse_intents
  @providers = parse_providers
end

Instance Attribute Details

#elemREXML::Element (readonly)

Returns:

  • (REXML::Element)


339
340
341
# File 'lib/android/manifest.rb', line 339

def elem
  @elem
end

#intentsArray<Manifest::Queries::Intent> (readonly)

Returns:



335
336
337
# File 'lib/android/manifest.rb', line 335

def intents
  @intents
end

#packagesManifest::Queries::Package (readonly)



333
334
335
# File 'lib/android/manifest.rb', line 333

def packages
  @packages
end

#providersArray<Manifest::Queries::Provider> (readonly)

Returns:



337
338
339
# File 'lib/android/manifest.rb', line 337

def providers
  @providers
end

#typeString (readonly)

Returns type string in TYPES.

Returns:

  • (String)

    type string in TYPES



331
332
333
# File 'lib/android/manifest.rb', line 331

def type
  @type
end