Class: Ajc

Inherits:
JavaTask show all
Defined in:
lib/jake/ajc.rb

Instance Attribute Summary collapse

Attributes inherited from JavaTask

#base_dir

Instance Method Summary collapse

Methods inherited from JavaTask

#execute, in

Constructor Details

#initialize(path) ⇒ Ajc

Returns a new instance of Ajc.



4
5
6
7
# File 'lib/jake/ajc.rb', line 4

def initialize(path)
  super(path)
  @cp = []
end

Instance Attribute Details

#cpObject

rt must be aspectJ runtime



2
3
4
# File 'lib/jake/ajc.rb', line 2

def cp
  @cp
end

#inpathObject

rt must be aspectJ runtime



2
3
4
# File 'lib/jake/ajc.rb', line 2

def inpath
  @inpath
end

#outjarObject

rt must be aspectJ runtime



2
3
4
# File 'lib/jake/ajc.rb', line 2

def outjar
  @outjar
end

#rtObject

rt must be aspectJ runtime



2
3
4
# File 'lib/jake/ajc.rb', line 2

def rt
  @rt
end

#srcObject

rt must be aspectJ runtime



2
3
4
# File 'lib/jake/ajc.rb', line 2

def src
  @src
end

Instance Method Details

#commandObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/jake/ajc.rb', line 9

def command
  classpath = []
classpath << @rt
inpath_arr = []

  @src = Dir.glob(@src)
  @cp.each do |p|
    puts "Globbing #{p}"
    classpath << Dir.glob(p)
    puts "CP = #{classpath}"
  end
  @inpath.each do |p|
    puts "Globbing #{p}"
    inpath_arr << Dir.glob(p)
    puts "inpath = #{inpath_arr}"
  end

  "ajc -cp " + classpath.join(cp_separator).to_s + " -inpath " + inpath_arr.join(cp_separator).to_s + " -outjar " + @outjar + " -1.5 "  + @src.join(' ').to_s
end