public abstract class ScopeComponent extends Object
,------------------.
|Parent_Scope |
|------------------|
|generation : 0 |
|componentOrder : 1|
`------------------'
/ \
,--------------------. ,--------------------.
|Sub_Scope_1 | |Sub_Scope_2 |
|--------------------| |--------------------|
|generation : 1 | |generation : 1 |
|componentOrder : 1.1| |componentOrder : 1.2|
`--------------------' `--------------------'
/ \
,----------------------. ,----------------------.
|Sub_Scope_2_1 | |Sub_Scope_2_2 |
|----------------------| |----------------------|
|generation : 2 | |generation : 2 |
|componentOrder : 1.2.1| |componentOrder : 1.2.2|
`----------------------' `----------------------'
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
componentOrder
The order number of current component in parent scope, the format is 'a.b.c'.
|
protected int |
generation
indicate the generation see diagram in description of
ScopeComponent |
protected LocalVariables |
locals
The local variables
|
| 构造器和说明 |
|---|
ScopeComponent(LocalVariables locals) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
compareComponentOrder(String order1,
String order2)
The compare rule is :
compare each generation order, for example 1.1.2 > 1.1.1, 1.1 > 1
order1 great than order2 return 1;
order1 less than order2 return -1;
order1 equal to order2 return 0;
|
LocalVariables |
getLocals()
Get @{link LocalVariables}
|
Scope |
getParent()
Get parent scope
|
void |
setParent(Scope parent)
Set the parent
Scope to current ScopeComponent |
protected LocalVariables locals
protected int generation
ScopeComponentprotected String componentOrder
ScopeComponentpublic ScopeComponent(LocalVariables locals)
public Scope getParent()
public final void setParent(Scope parent)
Scope to current ScopeComponentparent - protected int compareComponentOrder(String order1, String order2)
order1 - order2 - public LocalVariables getLocals()
Copyright © 2015. All rights reserved.