< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java

Print this page


   1 /*
   2  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Nov 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *     http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xalan.internal.xsltc.compiler;
  23 


  41 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
  42 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
  43 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
  44 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
  45 import java.util.ArrayList;
  46 import java.util.HashMap;
  47 import java.util.Iterator;
  48 import java.util.List;
  49 import java.util.Map;
  50 import org.xml.sax.Attributes;
  51 import org.xml.sax.helpers.AttributesImpl;
  52 
  53 
  54 /**
  55  * @author Jacek Ambroziak
  56  * @author Santiago Pericas-Geertsen
  57  * @author G. Todd Miller
  58  * @author Morten Jorensen
  59  * @author Erwin Bolwidt <ejb@klomp.org>
  60  * @author John Howard <JohnH@schemasoft.com>

  61  */
  62 public abstract class SyntaxTreeNode implements Constants {
  63 
  64     // Reference to the AST parser
  65     private Parser _parser;
  66 
  67     // AST navigation pointers
  68     protected SyntaxTreeNode _parent;          // Parent node
  69     private Stylesheet       _stylesheet;      // Stylesheet ancestor node
  70     private Template         _template;        // Template ancestor node
  71     private final List<SyntaxTreeNode> _contents = new ArrayList<>(2); // Child nodes
  72 
  73     // Element description data
  74     protected QName _qname;                    // The element QName
  75     private int _line;                         // Source file line number
  76     protected AttributesImpl _attributes = null;   // Attributes of this element
  77     private Map<String, String> _prefixMapping = null; // Namespace declarations
  78 
  79     // Sentinel - used to denote unrecognised syntaxt tree nodes.
  80     protected static final SyntaxTreeNode Dummy = new AbsolutePathPattern(null);


   1 /*
   2  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *     http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xalan.internal.xsltc.compiler;
  22 


  40 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
  41 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
  42 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
  43 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
  44 import java.util.ArrayList;
  45 import java.util.HashMap;
  46 import java.util.Iterator;
  47 import java.util.List;
  48 import java.util.Map;
  49 import org.xml.sax.Attributes;
  50 import org.xml.sax.helpers.AttributesImpl;
  51 
  52 
  53 /**
  54  * @author Jacek Ambroziak
  55  * @author Santiago Pericas-Geertsen
  56  * @author G. Todd Miller
  57  * @author Morten Jorensen
  58  * @author Erwin Bolwidt <ejb@klomp.org>
  59  * @author John Howard <JohnH@schemasoft.com>
  60  * @LastModified: Nov 2017
  61  */
  62 public abstract class SyntaxTreeNode implements Constants {
  63 
  64     // Reference to the AST parser
  65     private Parser _parser;
  66 
  67     // AST navigation pointers
  68     protected SyntaxTreeNode _parent;          // Parent node
  69     private Stylesheet       _stylesheet;      // Stylesheet ancestor node
  70     private Template         _template;        // Template ancestor node
  71     private final List<SyntaxTreeNode> _contents = new ArrayList<>(2); // Child nodes
  72 
  73     // Element description data
  74     protected QName _qname;                    // The element QName
  75     private int _line;                         // Source file line number
  76     protected AttributesImpl _attributes = null;   // Attributes of this element
  77     private Map<String, String> _prefixMapping = null; // Namespace declarations
  78 
  79     // Sentinel - used to denote unrecognised syntaxt tree nodes.
  80     protected static final SyntaxTreeNode Dummy = new AbsolutePathPattern(null);


< prev index next >