Class: Squash::Java::Class
Overview
Represents a Java class or inner class.
Instance Attribute Summary collapse
-
#classes ⇒ Array<Squash::Java::Class>
readonly
The inner classes of this class.
-
#java_methods ⇒ Array<Squash::Java::Method>
readonly
The instance methods of this class.
-
#obfuscation ⇒ String?
The obfuscated name of this class.
-
#parent ⇒ Squash::Java::Class, Squash::Java::Package
readonly
The parent package (or parent class for inner classes).
-
#path ⇒ String
The path to the .java file defining this class, relative to the project root.
Attributes inherited from Type
Instance Method Summary collapse
-
#full_name ⇒ String
The name of this class (with package and parent class names).
-
#initialize(parent, name) ⇒ Class
constructor
A new instance of Class.
- #subpath ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(parent, name) ⇒ Class
Returns a new instance of Class.
433 434 435 436 437 438 439 440 |
# File 'lib/squash/java/namespace.rb', line 433 def initialize(parent, name) @parent = parent @java_methods = Set.new @classes = Array.new @name = name @parent.classes << self end |
Instance Attribute Details
#classes ⇒ Array<Squash::Java::Class> (readonly)
Returns The inner classes of this class.
425 426 427 |
# File 'lib/squash/java/namespace.rb', line 425 def classes @classes end |
#java_methods ⇒ Array<Squash::Java::Method> (readonly)
Returns The instance methods of this class.
422 423 424 |
# File 'lib/squash/java/namespace.rb', line 422 def java_methods @java_methods end |
#obfuscation ⇒ String?
Returns The obfuscated name of this class.
419 420 421 |
# File 'lib/squash/java/namespace.rb', line 419 def obfuscation @obfuscation end |
#parent ⇒ Squash::Java::Class, Squash::Java::Package (readonly)
Returns The parent package (or parent class for inner classes).
416 417 418 |
# File 'lib/squash/java/namespace.rb', line 416 def parent @parent end |
#path ⇒ String
Returns The path to the .java file defining this class, relative to the project root.
430 431 432 |
# File 'lib/squash/java/namespace.rb', line 430 def path @path end |
Instance Method Details
#full_name ⇒ String
Returns The name of this class (with package and parent class names).
445 446 447 |
# File 'lib/squash/java/namespace.rb', line 445 def full_name "#{parent.full_name}.#{name}" end |