1 /*
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Oct 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
25 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
26 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
27 import com.sun.org.apache.bcel.internal.generic.InstructionList;
28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.NamedMethodGenerator;
32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
33 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
34 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
35 import com.sun.org.apache.xml.internal.utils.XML11Char;
36 import java.util.ArrayList;
37 import java.util.List;
38
39
40 /**
41 * @author Jacek Ambroziak
42 * @author Santiago Pericas-Geertsen
43 * @author Morten Jorgensen
44 * @author Erwin Bolwidt <ejb@klomp.org>
45 */
46 public final class Template extends TopLevelElement {
47
48 private QName _name; // The name of the template (if any)
49 private QName _mode; // Mode in which this template is instantiated.
50 private Pattern _pattern; // Matching pattern defined for this template.
51 private double _priority; // Matching priority of this template.
52 private int _position; // Position within stylesheet (prio. resolution)
53 private boolean _disabled = false;
54 private boolean _compiled = false;//make sure it is compiled only once
55 private boolean _simplified = false;
56
57 // True if this is a simple named template. A simple named
58 // template is a template which only has a name but no match pattern.
59 private boolean _isSimpleNamedTemplate = false;
60
61 // The list of parameters in this template. This is only used
62 // for simple named templates.
63 private List<Param> _parameters = new ArrayList<>();
64
|
1 /*
2 * Copyright (c) 2015, 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
24 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
25 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
26 import com.sun.org.apache.bcel.internal.generic.InstructionList;
27 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.NamedMethodGenerator;
31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
33 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
34 import com.sun.org.apache.xml.internal.utils.XML11Char;
35 import java.util.ArrayList;
36 import java.util.List;
37
38
39 /**
40 * @author Jacek Ambroziak
41 * @author Santiago Pericas-Geertsen
42 * @author Morten Jorgensen
43 * @author Erwin Bolwidt <ejb@klomp.org>
44 * @LastModified: Oct 2017
45 */
46 public final class Template extends TopLevelElement {
47
48 private QName _name; // The name of the template (if any)
49 private QName _mode; // Mode in which this template is instantiated.
50 private Pattern _pattern; // Matching pattern defined for this template.
51 private double _priority; // Matching priority of this template.
52 private int _position; // Position within stylesheet (prio. resolution)
53 private boolean _disabled = false;
54 private boolean _compiled = false;//make sure it is compiled only once
55 private boolean _simplified = false;
56
57 // True if this is a simple named template. A simple named
58 // template is a template which only has a name but no match pattern.
59 private boolean _isSimpleNamedTemplate = false;
60
61 // The list of parameters in this template. This is only used
62 // for simple named templates.
63 private List<Param> _parameters = new ArrayList<>();
64
|