Java Code Examples for sun.tools.java.ClassDefinition#getInterfaces()
The following examples show how to use
sun.tools.java.ClassDefinition#getInterfaces() .
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: CompoundType.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 2
Source File: CompoundType.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 3
Source File: CompoundType.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 4
Source File: CompoundType.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 5
Source File: CompoundType.java From hottub with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 6
Source File: CompoundType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 7
Source File: CompoundType.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected boolean inheritsFrom(ClassDefinition def, ClassDefinition otherDef) { if (def == otherDef) return true; ClassDefinition superDef; if (def.getSuperClass() != null) { superDef = def.getSuperClass().getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } ClassDeclaration[] interfaces = def.getInterfaces(); for (int i=0; i<interfaces.length; i++) { superDef = interfaces[i].getClassDefinition(); if (inheritsFrom(superDef, otherDef)) return true; } return false; }
Example 8
Source File: CompoundType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 9
Source File: CompoundType.java From openjdk-8-source with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 10
Source File: CompoundType.java From hottub with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 11
Source File: CompoundType.java From openjdk-8 with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 12
Source File: CompoundType.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 13
Source File: CompoundType.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 14
Source File: CompoundType.java From openjdk-8 with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 15
Source File: CompoundType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 16
Source File: CompoundType.java From openjdk-jdk8u with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 17
Source File: CompoundType.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 18
Source File: CompoundType.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 19
Source File: CompoundType.java From TencentKona-8 with GNU General Public License v2.0 | 2 votes |
protected Vector addNonRemoteInterfaces (Vector list, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // First try SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack); if (it == null) { // Then try AbstractType... it = AbstractType.forAbstract(def,stack,true); if (it == null) { // Then try NCInterfaceType... it = NCInterfaceType.forNCInterface(def,stack); } } if (it != null) { list.addElement(it); } else { return null; } } return list; }
Example 20
Source File: CompoundType.java From TencentKona-8 with GNU General Public License v2.0 | 2 votes |
protected Vector addRemoteInterfaces (Vector list, boolean allowNonConforming, ContextStack stack) throws ClassNotFound { // Add all the interfaces of current... ClassDefinition theInterface = getClassDefinition(); ClassDeclaration[] interfaces = theInterface.getInterfaces(); stack.setNewContextCode(ContextStack.IMPLEMENTS); for (int i = 0; i < interfaces.length; i++) { ClassDefinition def = interfaces[i].getClassDefinition(env); // Is it a SpecialInterfaceType... InterfaceType it = SpecialInterfaceType.forSpecial(def,stack);; if (it == null) { // No, is it Remote? if (env.defRemote.implementedBy(env, interfaces[i])) { // Yes, so it must be a RemoteType. it = RemoteType.forRemote(def,stack,false); } else { // Then try Abstract... it = AbstractType.forAbstract(def,stack,true); if (it == null && allowNonConforming) { // Must be non-conforming... it = NCInterfaceType.forNCInterface(def,stack); } } } if (it != null) { list.addElement(it); } else { return null; } } return list; }