Java Code Examples for sun.tools.java.Identifier#equals()
The following examples show how to use
sun.tools.java.Identifier#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpecialInterfaceType.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 2
Source File: SpecialInterfaceType.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 3
Source File: SpecialInterfaceType.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 4
Source File: SpecialInterfaceType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 5
Source File: SpecialInterfaceType.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 6
Source File: SpecialInterfaceType.java From hottub with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 7
Source File: SpecialInterfaceType.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 8
Source File: SpecialInterfaceType.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static boolean isSpecial(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) { if (type.isType(TC_CLASS)) { Identifier id = type.getClassName(); if (id.equals(idRemote)) return true; if (id == idJavaIoSerializable) return true; if (id == idJavaIoExternalizable) return true; if (id == idCorbaObject) return true; if (id == idIDLEntity) return true; BatchEnvironment env = stack.getEnv(); try { if (env.defCorbaObject.implementedBy(env,theClass.getClassDeclaration())) return true; } catch (ClassNotFound e) { classNotFound(stack,e); } } return false; }
Example 9
Source File: SpecialInterfaceType.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 10
Source File: SpecialInterfaceType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 11
Source File: SpecialInterfaceType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 12
Source File: SpecialInterfaceType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 13
Source File: SpecialInterfaceType.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 14
Source File: SpecialInterfaceType.java From hottub with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 15
Source File: SpecialInterfaceType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }
Example 16
Source File: SpecialInterfaceType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private boolean initialize(sun.tools.java.Type type, ContextStack stack) { int typeCode = TYPE_NONE; Identifier id = null; String idlName = null; String[] idlModuleName = null; boolean constant = stack.size() > 0 && stack.getContext().isConstant(); if (type.isType(TC_CLASS)) { id = type.getClassName(); if (id.equals(idRemote)) { typeCode = TYPE_JAVA_RMI_REMOTE; idlName = IDL_JAVA_RMI_REMOTE; idlModuleName = IDL_JAVA_RMI_MODULE; } else if (id == idJavaIoSerializable) { typeCode = TYPE_ANY; idlName = IDL_SERIALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idJavaIoExternalizable) { typeCode = TYPE_ANY; idlName = IDL_EXTERNALIZABLE; idlModuleName = IDL_JAVA_IO_MODULE; } else if (id == idIDLEntity) { typeCode = TYPE_ANY; idlName = IDL_IDLENTITY; idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE; } else { typeCode = TYPE_CORBA_OBJECT; // Is it exactly org.omg.CORBA.Object? if (id == idCorbaObject) { // Yes, so special case... idlName = IDLNames.getTypeName(typeCode,constant); idlModuleName = null; } else { // No, so get the correct names... try { // These can fail if we get case-sensitive name matches... idlName = IDLNames.getClassOrInterfaceName(id,env); idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env); } catch (Exception e) { failedConstraint(7,false,stack,id.toString(),e.getMessage()); throw new CompilerError(""); } } } } if (typeCode == TYPE_NONE) { return false; } // Reset type code... setTypeCode(typeCode | TM_SPECIAL_INTERFACE | TM_INTERFACE | TM_COMPOUND); // Set names if (idlName == null) { throw new CompilerError("Not a special type"); } setNames(id,idlModuleName,idlName); // Initialize CompoundType... return initialize(null,null,null,stack,false); }