Java Code Examples for sun.tools.java.ClassDeclaration#getName()
The following examples show how to use
sun.tools.java.ClassDeclaration#getName() .
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 TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 2
Source File: CompoundType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 3
Source File: CompoundType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 4
Source File: CompoundType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 5
Source File: CompoundType.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 6
Source File: CompoundType.java From hottub with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 7
Source File: CompoundType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }
Example 8
Source File: CompoundType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Vector updateParentClassMethods(ClassDefinition current, Vector currentMethods, boolean quiet, ContextStack stack) throws ClassNotFound { ClassDeclaration parentDecl = current.getSuperClass(env); while (parentDecl != null) { ClassDefinition parentDef = parentDecl.getClassDefinition(env); Identifier currentID = parentDecl.getName(); if ( currentID == idJavaLangObject ) break; // Walk all members of this class and update any that // already exist in currentMethods... for (MemberDefinition member = parentDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod() && !member.isInitializer() && !member.isConstructor() && !member.isPrivate()) { // It's a method. Is it valid? Method method; try { method = new Method((CompoundType)this,member,quiet,stack); } catch (Exception e) { // Don't report anything here, it's already been reported... return null; } // Have we already seen it? int index = currentMethods.indexOf(method); if (index >= 0) { // Yes, so update it... Method currentMethod = (Method)currentMethods.elementAt(index); currentMethod.setDeclaredBy(currentID); } else currentMethods.addElement(method); } } // Update parent and keep walking up the chain... parentDecl = parentDef.getSuperClass(env); } return currentMethods; }