src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * reserved comment block |
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT REMOVE OR ALTER! |
3 * @LastModified: Oct 2017 |
4 */ |
4 */ |
5 /* |
5 /* |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
7 * contributor license agreements. See the NOTICE file distributed with |
7 * contributor license agreements. See the NOTICE file distributed with |
8 * this work for additional information regarding copyright ownership. |
8 * this work for additional information regarding copyright ownership. |
147 |
147 |
148 /** |
148 /** |
149 * Translates an internal boolean into an external (Java) boolean. |
149 * Translates an internal boolean into an external (Java) boolean. |
150 */ |
150 */ |
151 public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, |
151 public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, |
152 Class clazz) { |
152 Class<?> clazz) { |
153 if (clazz == java.lang.Boolean.TYPE) { |
153 if (clazz == java.lang.Boolean.TYPE) { |
154 methodGen.getInstructionList().append(NOP); |
154 methodGen.getInstructionList().append(NOP); |
155 } |
155 } |
156 // Is Boolean <: clazz? I.e. clazz in { Boolean, Object } |
156 // Is Boolean <: clazz? I.e. clazz in { Boolean, Object } |
157 else if (clazz.isAssignableFrom(java.lang.Boolean.class)) { |
157 else if (clazz.isAssignableFrom(java.lang.Boolean.class)) { |
166 |
166 |
167 /** |
167 /** |
168 * Translates an external (Java) boolean into internal boolean. |
168 * Translates an external (Java) boolean into internal boolean. |
169 */ |
169 */ |
170 public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen, |
170 public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen, |
171 Class clazz) { |
171 Class<?> clazz) { |
172 translateTo(classGen, methodGen, clazz); |
172 translateTo(classGen, methodGen, clazz); |
173 } |
173 } |
174 |
174 |
175 /** |
175 /** |
176 * Translates an object of this type to its boxed representation. |
176 * Translates an object of this type to its boxed representation. |