-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide internals of PBasicNode from outside world
- Loading branch information
1 parent
c7f1861
commit 5fba637
Showing
2 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ng-appserver/src/main/java/ng/appserver/templating/PBasicNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
package ng.appserver.templating; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
import ng.appserver.templating.NGDeclaration.NGBindingValue; | ||
|
||
public record PBasicNode( NGDynamicHTMLTag tag ) implements PNode { | ||
|
||
public PBasicNode { | ||
Objects.requireNonNull( tag ); | ||
} | ||
|
||
public boolean isInline() { | ||
return tag().declaration().isInline(); | ||
} | ||
|
||
public String type() { | ||
return tag().declaration().type(); | ||
} | ||
|
||
public Map<String, NGBindingValue> bindings() { | ||
return tag().declaration().bindings(); | ||
} | ||
|
||
public List<PNode> children() { | ||
return tag().childrenWithStringsProcessedAndCombined(); | ||
} | ||
} |