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.xerces.internal.jaxp.validation;
23
24 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
25 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
26 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
27
28 /**
29 * <p>Filter {@link XMLGrammarPool} that exposes a
30 * read-only view of the underlying pool.</p>
31 *
32 * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
33 */
34 final class ReadOnlyGrammarPool implements XMLGrammarPool {
35
36 private final XMLGrammarPool core;
37
38 public ReadOnlyGrammarPool( XMLGrammarPool pool ) {
39 this.core = pool;
40 }
41
42 public void cacheGrammars(String grammarType, Grammar[] grammars) {
43 // noop. don't let caching to happen
44 }
45
46 public void clear() {
47 // noop. cache is read-only.
48 }
49
50 public void lockPool() {
51 // noop. this pool is always read-only
52 }
|
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.xerces.internal.jaxp.validation;
23
24 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
25 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
26 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
27
28 /**
29 * <p>Filter {@link XMLGrammarPool} that exposes a
30 * read-only view of the underlying pool.</p>
31 *
32 * @author Kohsuke Kawaguchi
33 */
34 final class ReadOnlyGrammarPool implements XMLGrammarPool {
35
36 private final XMLGrammarPool core;
37
38 public ReadOnlyGrammarPool( XMLGrammarPool pool ) {
39 this.core = pool;
40 }
41
42 public void cacheGrammars(String grammarType, Grammar[] grammars) {
43 // noop. don't let caching to happen
44 }
45
46 public void clear() {
47 // noop. cache is read-only.
48 }
49
50 public void lockPool() {
51 // noop. this pool is always read-only
52 }
|