Class: Jnlp::J2se

Inherits:
Object
  • Object
show all
Defined in:
lib/jnlp/j2se.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(j2se, os = nil, arch = nil) ⇒ J2se

Creates a new Jnlp::Property object.

  • prop: the Hpricot parsing of the specific jnlp/resources/property element

  • os: optional: include it if the resources parent element that contains the property has this attribute set



69
70
71
72
73
74
75
76
77
# File 'lib/jnlp/j2se.rb', line 69

def initialize(j2se, os=nil, arch=nil)
  @j2se = j2se
  @version = j2se['version']
  @max_heap_size = j2se['max-heap-size']
  @initial_heap_size = j2se['initial-heap-size']
  @java_vm_args = j2se['java-vm-args']
  @os = os
  @arch = arch
end

Instance Attribute Details

#archObject (readonly)

Contains the value of the arch attribute in the parent <resources> element that contains this property if the attribute was set in the parent.The attribute is normalized by converting to lowercase and changing ‘ ’ characters to ‘_’

Examples:

"ppc i386" => "ppc_i386"
"x86_64"   => "x86_64"


63
64
65
# File 'lib/jnlp/j2se.rb', line 63

def arch
  @arch
end

#initial_heap_sizeObject (readonly)

Contains the initial-heap-size specified in the J2SE element:

Example:

"32m"


31
32
33
# File 'lib/jnlp/j2se.rb', line 31

def initial_heap_size
  @initial_heap_size
end

#j2seObject (readonly)

Contains the Hpricot element parsed from the orginal Jnlp that was used to create the Property



7
8
9
# File 'lib/jnlp/j2se.rb', line 7

def j2se
  @j2se
end

#java_vm_argsObject (readonly)

Contains the value of the optional java-vm-args attribute in in the J2SE element, the value is nil if not present:

Example:

"-d32"


40
41
42
# File 'lib/jnlp/j2se.rb', line 40

def java_vm_args
  @java_vm_args
end

#max_heap_sizeObject (readonly)

Contains the max-heap-size specified in the J2SE element:

Example:

"128m"


23
24
25
# File 'lib/jnlp/j2se.rb', line 23

def max_heap_size
  @max_heap_size
end

#osObject (readonly)

Contains the value of the os attribute in the parent <resources> element that contains this property if the attribute was set in the parent. The attribute is normalized by converting to lowercase and changing ‘ ’ characters to ‘_’

Example:

"Mac OS X" => "mac_os_x"


51
52
53
# File 'lib/jnlp/j2se.rb', line 51

def os
  @os
end

#versionObject (readonly)

Contains the version of the J2SE element:

Example:

"1.5+"


15
16
17
# File 'lib/jnlp/j2se.rb', line 15

def version
  @version
end