mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
実装
This commit is contained in:
1 file changed
+17
@@ -6,6 +6,11 @@ import java.util.List;
|
||||
public class PublicPath {
|
||||
/*
|
||||
* ユーザーが扱うパス(内部パスの代替)
|
||||
* (時間がないのでInjectされることは考慮しない)
|
||||
*
|
||||
* TODO-rca:
|
||||
* - こわれたパスを検知する
|
||||
* - バリデーション
|
||||
*/
|
||||
|
||||
List<String> path = new ArrayList<String>();
|
||||
@@ -41,6 +46,18 @@ public class PublicPath {
|
||||
return this;
|
||||
}
|
||||
|
||||
public PublicPath resolve(PublicPath path) {
|
||||
for (String p : path.getPath()) {
|
||||
resolveInternal(p);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public PublicPath parent() {
|
||||
this.path.remove(this.path.size() - 1);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user