Class: JavaClass::Classpath::FileClasspath
- Defined in:
- lib/javaclass/classpath/file_classpath.rb
Overview
Abstract concept of a classpath pointing to a file.
- Author
-
Peter Kofler
Direct Known Subclasses
Instance Method Summary collapse
-
#==(other) ⇒ Object
Equality with other delegated to to_s.
-
#additional_classpath ⇒ Object
Return an empty array.
-
#elements ⇒ Object
Return the classpath elements of this (composite) classpath.
-
#initialize(root) ⇒ FileClasspath
constructor
Create a classpath with this root .
-
#jar? ⇒ Boolean
Return
false
as this is no jar. -
#to_key(classname) ⇒ Object
Return the key for the access of this class file named classname .
- #to_s ⇒ Object
Constructor Details
#initialize(root) ⇒ FileClasspath
Create a classpath with this root .
11 12 13 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 11 def initialize(root) @root = root end |
Instance Method Details
#==(other) ⇒ Object
Equality with other delegated to to_s.
30 31 32 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 30 def ==(other) other.class == self.class && other.to_s == self.to_s end |
#additional_classpath ⇒ Object
Return an empty array.
21 22 23 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 21 def additional_classpath [] end |
#elements ⇒ Object
Return the classpath elements of this (composite) classpath
35 36 37 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 35 def elements [self] end |
#jar? ⇒ Boolean
Return false
as this is no jar.
16 17 18 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 16 def jar? false end |
#to_key(classname) ⇒ Object
Return the key for the access of this class file named classname .
40 41 42 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 40 def to_key(classname) classname.to_javaname.to_class_file end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/javaclass/classpath/file_classpath.rb', line 25 def to_s @root.to_s end |