private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }
private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }
private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
} else { boolean typeModified = false; for (Class<?> iface : typeInfo.getInterfaces()) { if (!iface.isAssignableFrom(typeInfo.getSuperClass())) { typeModified = true;
private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }
private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }
private static String createCompoundProxyName(String contextId, Bean<?> bean, TypeInfo typeInfo, StringBuilder name) { String className; final List<String> interfaces = new ArrayList<String>(); for (Class<?> type : typeInfo.getInterfaces()) { interfaces.add(type.getSimpleName()); } Collections.sort(interfaces); for (final String iface : interfaces) { name.append(iface); name.append('$'); } //there is a remote chance that this could generate the same //proxy name for two interfaces with the same simple name. //append the hash code of the bean id to be sure // However, it is safe to share a proxy class for built-in beans of the same type (e.g. Event) if (bean != null && !(bean instanceof AbstractBuiltInBean)) { final BeanIdentifier id = Container.instance(contextId).services().get(ContextualStore.class).putIfAbsent(bean); int idHash = id.hashCode(); name.append(Math.abs(idHash == Integer.MIN_VALUE ? 0 : idHash)); } className = name.toString(); return className; }