public void addParentInterfaceName(String parentInterfaceName) { getParentInterfaceNames().add(parentInterfaceName); }
public void addParentInterfaceName(String parentInterfaceName) { getParentInterfaceNames().addElement(parentInterfaceName); }
public void addParentInterfaceName(String parentInterfaceName) { getParentInterfaceNames().add(parentInterfaceName); }
protected void addInterfaceLines(NonreflectiveMethodDefinition method, InterfacePolicy policy) { method.addLine("// Interface Properties."); if (policy.isInterfaceChildDescriptor()) { for (Iterator<String> interfacesEnum = policy.getParentInterfaceNames().iterator(); interfacesEnum.hasNext();) { String parentInterfaceName = interfacesEnum.next(); method.addLine("descriptor.getInterfacePolicy().addParentInterface(" + parentInterfaceName + ".class);"); } } }
protected void addInterfaceLines(NonreflectiveMethodDefinition method, InterfacePolicy policy) { method.addLine("// Interface Properties."); if (policy.isInterfaceChildDescriptor()) { for (Iterator<String> interfacesEnum = policy.getParentInterfaceNames().iterator(); interfacesEnum.hasNext();) { String parentInterfaceName = interfacesEnum.next(); method.addLine("descriptor.getInterfacePolicy().addParentInterface(" + parentInterfaceName + ".class);"); } } }
protected void addInterfaceLines(NonreflectiveMethodDefinition method, InterfacePolicy policy) { method.addLine("// Interface Properties."); if (policy.isInterfaceChildDescriptor()) { for (Enumeration interfacesEnum = policy.getParentInterfaceNames().elements(); interfacesEnum.hasMoreElements();) { String parentInterfaceName = (String)interfacesEnum.nextElement(); method.addLine("descriptor.getInterfacePolicy().addParentInterface(" + parentInterfaceName + ".class);"); } } }
/** * INTERNAL: * Convert all the class-name-based settings in this InheritancePolicy to actual class-based settings. * This method is used when converting a project that has been built with class names to a project with classes. * It will also convert referenced classes to the versions of the classes from the classLoader. */ public void convertClassNamesToClasses(ClassLoader classLoader) { Vector newParentInterfaces = new Vector(); for (Iterator iterator = getParentInterfaceNames().iterator(); iterator.hasNext(); ) { String interfaceName = (String)iterator.next(); Class interfaceClass = null; try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { interfaceClass = (Class)AccessController.doPrivileged(new PrivilegedClassForName(interfaceName, true, classLoader)); } catch (PrivilegedActionException exception) { throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exception.getException()); } } else { interfaceClass = org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(interfaceName, true, classLoader); } } catch (ClassNotFoundException exc){ throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exc); } newParentInterfaces.add(interfaceClass); } this.parentInterfaces = newParentInterfaces; }
/** * INTERNAL: * Convert all the class-name-based settings in this InheritancePolicy to actual class-based settings. * This method is used when converting a project that has been built with class names to a project with classes. * It will also convert referenced classes to the versions of the classes from the classLoader. */ public void convertClassNamesToClasses(ClassLoader classLoader) { List<Class> newParentInterfaces = new ArrayList(2); for (Iterator iterator = getParentInterfaceNames().iterator(); iterator.hasNext(); ) { String interfaceName = (String)iterator.next(); Class interfaceClass = null; try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { interfaceClass = AccessController.doPrivileged(new PrivilegedClassForName(interfaceName, true, classLoader)); } catch (PrivilegedActionException exception) { throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exception.getException()); } } else { interfaceClass = org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(interfaceName, true, classLoader); } } catch (ClassNotFoundException exc){ throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exc); } newParentInterfaces.add(interfaceClass); } this.parentInterfaces = newParentInterfaces; }
/** * INTERNAL: * Convert all the class-name-based settings in this InheritancePolicy to actual class-based settings. * This method is used when converting a project that has been built with class names to a project with classes. * It will also convert referenced classes to the versions of the classes from the classLoader. */ public void convertClassNamesToClasses(ClassLoader classLoader) { List<Class> newParentInterfaces = new ArrayList(2); for (Iterator iterator = getParentInterfaceNames().iterator(); iterator.hasNext(); ) { String interfaceName = (String)iterator.next(); Class interfaceClass = null; try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { interfaceClass = AccessController.doPrivileged(new PrivilegedClassForName(interfaceName, true, classLoader)); } catch (PrivilegedActionException exception) { throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exception.getException()); } } else { interfaceClass = org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(interfaceName, true, classLoader); } } catch (ClassNotFoundException exc){ throw ValidationException.classNotFoundWhileConvertingClassNames(interfaceName, exc); } newParentInterfaces.add(interfaceClass); } this.parentInterfaces = newParentInterfaces; }