public String serializedClass(Class type) { Class baseType = (Class)implToType.get(type); return baseType == null ? super.serializedClass(type) : super.serializedClass(baseType); }
public String serializedClass(Class type) { if (Proxy.isProxyClass(type)) { return alias; } else { return super.serializedClass(type); } }
@Override public String serializedClass(Class type) { if (type == null) { return super.serializedClass(type); } if (Enum.class.isAssignableFrom(type) && type.getSuperclass() != Enum.class) { return super.serializedClass(type.getSuperclass()); } else if (EnumSet.class.isAssignableFrom(type)) { return super.serializedClass(EnumSet.class); } else { return super.serializedClass(type); } }
public String serializedClass(final Class type) { final String className = type.getName(); int length = className.length(); int dot = -1; do { dot = className.lastIndexOf('.', length); final String pkg = dot < 0 ? "" : className.substring(0, dot + 1); final String alias = (String)packageToName.get(pkg); if (alias != null) { return alias + (dot < 0 ? className : className.substring(dot + 1)); } length = dot - 1; } while (dot >= 0); return super.serializedClass(type); }
public String serializedClass(Class type) { String alias = (String) classToName.get(type.getName()); if (alias != null) { return alias; } else { for (final Iterator iter = typeToName.keySet().iterator(); iter.hasNext();) { final Class compatibleType = (Class)iter.next(); if (compatibleType.isAssignableFrom(type)) { return (String)typeToName.get(compatibleType); } } return super.serializedClass(type); } }
public String serializedClass(Class type) { String serializedName = super.serializedClass(type); if (type == null) { return serializedName; } String typeName = type.getName(); return typeName.equals(serializedName) && typeName.indexOf(DEFAULT_NAMING_MARKER) > 0 && Enhancer.isEnhanced(type) ? alias : serializedName; }
@Override public String serializedClass(final Class type) { if (!locked) { processAnnotations(type); } return super.serializedClass(type); }
public String serializedClass(Class type) { StringBuffer arraySuffix = new StringBuffer(); String name = null; while (type.isArray()) { name = super.serializedClass(type); if (type.getName().equals(name)) { type = type.getComponentType(); arraySuffix.append("-array"); name = null; } else { break; } } if (name == null) { name = boxedTypeName(type); } if (name == null) { name = super.serializedClass(type); } if (arraySuffix.length() > 0) { return name + arraySuffix; } else { return name; } }
@Override public String serializedClass(final Class type) { Class<?> replacement = null; if (Types.isLambdaType(type)) { if (Serializable.class.isAssignableFrom(type)) { final Class<?>[] interfaces = type.getInterfaces(); if (interfaces.length > 1) { for (int i = 0; replacement == null && i < interfaces.length; i++) { final Class<?> iface = interfaces[i]; for (final Method method : iface.getMethods()) { if (!method.isDefault() && !Modifier.isStatic(method.getModifiers())) { replacement = iface; break; } } } } else { replacement = interfaces[0]; } } else { replacement = Null.class; } } return super.serializedClass(replacement == null ? type : replacement); } }
@Override public String serializedClass(final Class<?> type) { final Class<?> baseType = implToType.get(type); return baseType == null ? super.serializedClass(type) : super.serializedClass(baseType); }
@Override public String serializedClass(final Class<?> type) { if (Proxy.isProxyClass(type)) { return alias; } else { return super.serializedClass(type); } }
public String serializedClass(Class type) { if (Proxy.isProxyClass(type)) { return alias; } else { return super.serializedClass(type); } }
public String serializedClass(Class type) { if (Proxy.isProxyClass(type)) { return alias; } else { return super.serializedClass(type); } }
public String serializedClass(Class type) { if (Proxy.isProxyClass(type)) { return alias; } else { return super.serializedClass(type); } }
@Override public String serializedClass(final Class<?> type) { if (type == null) { return super.serializedClass(type); } if (Enum.class.isAssignableFrom(type) && type.getSuperclass() != Enum.class) { return super.serializedClass(type.getSuperclass()); } else if (EnumSet.class.isAssignableFrom(type)) { return super.serializedClass(EnumSet.class); } else { return super.serializedClass(type); } }
@Override public String serializedClass(@SuppressWarnings("rawtypes") // superclass does not use types Class type) { if (type == null) { return super.serializedClass(null); // was type, but that caused FindBugs warning } String alias = classToAlias(type.getName()); return alias == null ? super.serializedClass(type) : alias ; } };
@Override public String serializedClass(final Class<?> type) { final String serializedName = super.serializedClass(type); if (type == null) { return serializedName; } final String typeName = type.getName(); return typeName.equals(serializedName) && typeName.indexOf(DEFAULT_NAMING_MARKER) > 0 && Enhancer.isEnhanced(type) ? alias : serializedName; }
public String serializedClass(Class type) { String serializedName = super.serializedClass(type); if (type == null) { return serializedName; } String typeName = type.getName(); return typeName.equals(serializedName) && typeName.indexOf(DEFAULT_NAMING_MARKER) > 0 && Enhancer.isEnhanced(type) ? alias : serializedName; }
@Override public String serializedClass(final Class type) { if (!locked) { processAnnotations(type); } return super.serializedClass(type); }
@Override public String serializedClass(final Class type) { if (!locked) { processAnnotations(type); } String name = serializedClass.get(type); if (name!=null) return name; return super.serializedClass(type); }