home *** CD-ROM | disk | FTP | other *** search
- package com.kav.xsl;
-
- import org.w3c.dom.Node;
-
- public class AVTComponent {
- public static final int STRING_EXPR = 0;
- public static final int STRING_LITERAL = 1;
- private int type;
- private Object component;
-
- public AVTComponent(String var1) {
- this.type = 1;
- this.component = var1;
- }
-
- public AVTComponent(StringExpr var1) {
- this.type = 0;
- this.component = var1;
- }
-
- public int getType() {
- return this.type;
- }
-
- public String getValue(Node var1, ProcessorState var2) {
- if (this.component == null) {
- return "";
- } else {
- return this.type == 1 ? (String)this.component : ((StringExpr)this.component).getValue(var1, var2);
- }
- }
-
- public void setComponent(String var1) {
- this.type = 1;
- this.component = var1;
- }
-
- public void setComponent(StringExpr var1) {
- this.type = 0;
- this.component = var1;
- }
-
- public String toString() {
- if (this.component == null) {
- return "";
- } else {
- return this.type == 1 ? (String)this.component : ((StringExpr)this.component).toString();
- }
- }
- }
-