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 * $Id: SymbolTable.java,v 1.5 2005/09/28 13:48:16 pvedula Exp $
23 */
24
25 package com.sun.org.apache.xalan.internal.xsltc.compiler;
26
27 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType;
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Stack;
33 import java.util.StringTokenizer;
34
35 /**
36 * @author Jacek Ambroziak
37 * @author Santiago Pericas-Geertsen
38 * @author Morten Jorgensen
39 */
40 final class SymbolTable {
41
42 // These maps are used for all stylesheets
43 private final Map<String, Stylesheet> _stylesheets = new HashMap<>();
44 private final Map<String, List<MethodType>> _primops = new HashMap<>();
45
46 // These maps are used for some stylesheets
47 private Map<String, VariableBase> _variables = null;
48 private Map<String, Template> _templates = null;
49 private Map<String, AttributeSet> _attributeSets = null;
50 private Map<String, String> _aliases = null;
51 private Map<String, Integer> _excludedURI = null;
52 private Stack<Map<String, Integer>> _excludedURIStack = null;
53 private Map<String, DecimalFormatting> _decimalFormats = null;
54 private Map<String, Key> _keys = null;
55
56 public DecimalFormatting getDecimalFormatting(QName name) {
57 if (_decimalFormats == null) return null;
58 return(_decimalFormats.get(name.getStringRep()));
|
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 * $Id: SymbolTable.java,v 1.5 2005/09/28 13:48:16 pvedula Exp $
22 */
23
24 package com.sun.org.apache.xalan.internal.xsltc.compiler;
25
26 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType;
27 import java.util.ArrayList;
28 import java.util.HashMap;
29 import java.util.List;
30 import java.util.Map;
31 import java.util.Stack;
32 import java.util.StringTokenizer;
33
34 /**
35 * @author Jacek Ambroziak
36 * @author Santiago Pericas-Geertsen
37 * @author Morten Jorgensen
38 * @LastModified: Oct 2017
39 */
40 final class SymbolTable {
41
42 // These maps are used for all stylesheets
43 private final Map<String, Stylesheet> _stylesheets = new HashMap<>();
44 private final Map<String, List<MethodType>> _primops = new HashMap<>();
45
46 // These maps are used for some stylesheets
47 private Map<String, VariableBase> _variables = null;
48 private Map<String, Template> _templates = null;
49 private Map<String, AttributeSet> _attributeSets = null;
50 private Map<String, String> _aliases = null;
51 private Map<String, Integer> _excludedURI = null;
52 private Stack<Map<String, Integer>> _excludedURIStack = null;
53 private Map<String, DecimalFormatting> _decimalFormats = null;
54 private Map<String, Key> _keys = null;
55
56 public DecimalFormatting getDecimalFormatting(QName name) {
57 if (_decimalFormats == null) return null;
58 return(_decimalFormats.get(name.getStringRep()));
|