private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return ((AliasRegistryConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getAliasRegistry().getAliasForType(clazz.getName()); }
public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return ((AliasRegistryConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getAliasRegistry().getAliasForType(clazz.getName()); }
public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return ((AliasRegistryConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getAliasRegistry().getAliasForType(clazz.getName()); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }