| Package | org.granite.reflect.visitor |
| Class | public class Visitable |
Visitable instance encapsulates a bean, a property of
a bean or an item of a collection (at arbitrary depth).
| Property | Defined by | ||
|---|---|---|---|
| data : *
An arbitrary user data attached to this
Visitable. | Visitable | ||
| element : IVisitableElement
[read-only]
The type of this
Visitable. | Visitable | ||
| parent : Visitable
[read-only]
The parent of this
Visitable (null if this
Visitable is a root bean). | Visitable | ||
| path : String [read-only]
The string representation of the path from the root visitable to this
Visitable (this representation is dot-separated, even for
a collection index or a map key, and is only meant to be used for tracing). | Visitable | ||
| property : String [read-only]
The name of the property represented by this
Visitable (may be
null if this Visitable doesn't represent a property). | Visitable | ||
| root : Visitable
[read-only]
The root parent of this
Visitable. | Visitable | ||
| value : * [read-only]
The value of this
Visitable. | Visitable | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructs a new
Visitable object. | Visitable | ||
|
isRoot():Boolean
Tells if this
Visitable is a root visitable (no parent). | Visitable | ||
|
toString():String
Returns a string representation this
Visitable with its full
path and its value. | Visitable | ||
| data | property |
data:* [read-write]
An arbitrary user data attached to this Visitable.
public function get data():*
public function set data(value:*):void
| element | property |
element:IVisitableElement [read-only]
The type of this Visitable.
public function get element():IVisitableElement
See also
| parent | property |
parent:Visitable [read-only]
The parent of this Visitable (null if this
Visitable is a root bean).
public function get parent():Visitable
| path | property |
path:String [read-only]
The string representation of the path from the root visitable to this
Visitable (this representation is dot-separated, even for
a collection index or a map key, and is only meant to be used for tracing).
public function get path():String
| property | property |
property:String [read-only]
The name of the property represented by this Visitable (may be
null if this Visitable doesn't represent a property).
public function get property():String
| root | property |
root:Visitable [read-only]
The root parent of this Visitable.
public function get root():Visitable
| value | property |
value:* [read-only]
The value of this Visitable.
public function get value():*
| Visitable | () | constructor |
public function Visitable(parent:Visitable, element:IVisitableElement, value:*)
Constructs a new Visitable object.
parent:Visitable — the parent of this Visitable element (may be
null if this element is a root).
|
|
element:IVisitableElement — the type of this Visitable element.
|
|
value:* — the element to be visited.
|
— if the element parameter is null.
|
| isRoot | () | method |
public function isRoot():Boolean
Tells if this Visitable is a root visitable (no parent).
Boolean — true if this Visitable is a root,
false otherwise.
|
| toString | () | method |
public function toString():String
Returns a string representation this Visitable with its full
path and its value.
String — a string representation this Visitable.
|