- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,428 for Serializer (0.18 sec)
-
schema/serializer.go
var serializerMap = sync.Map{} // RegisterSerializer register serializer func RegisterSerializer(name string, serializer SerializerInterface) { serializerMap.Store(strings.ToLower(name), serializer) } // GetSerializer get serializer func GetSerializer(name string) (serializer SerializerInterface, ok bool) { v, ok := serializerMap.Load(strings.ToLower(name)) if ok { serializer, ok = v.(SerializerInterface) } return serializer, ok }
Registered: 2024-06-12 16:27 - Last Modified: 2024-03-18 08:28 - 4.6K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/Serializer.java
* See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.internal.serialize; import java.io.EOFException; public interface Serializer<T> { /** * Reads the next object from the given stream. The implementation must not perform any buffering, so that it reads only those bytes from the input stream that are
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 1.3K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/DefaultSerializerRegistryTest.groovy
serialize(123L, serializer) == 123L serialize(123, serializer) == 123 serialize(123.4, serializer) == 123.4 } def "custom serialization takes precedence over Java serialization"() { given: def customSerializer = Stub(Serializer) { read(_) >> { Decoder decoder -> return decoder.readSmallLong() + 1 }
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 6.2K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/Serializers.java
*/ package org.gradle.internal.serialize; public class Serializers { public static <T> StatefulSerializer<T> stateful(final Serializer<T> serializer) { return new StatefulSerializerAdapter<T>(serializer); } private static class StatefulSerializerAdapter<T> implements StatefulSerializer<T> { private final Serializer<T> serializer;
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 2.2K bytes - Viewed (0) -
platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/remote/internal/hub/DefaultMethodArgsSerializerTest.groovy
Registered: 2024-06-12 18:38 - Last Modified: 2023-09-22 08:59 - 2.2K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/testFixtures/groovy/org/gradle/internal/serialize/SerializerSpec.groovy
return fromBytes(bytes, serializer) } <T> T fromBytes(byte[] bytes, Serializer<T> serializer) { return serializer.read(getDecoder().newInstance(new ByteArrayInputStream(bytes))) } <T> byte[] toBytes(T value, Serializer<T> serializer) { def bytes = new ByteArrayOutputStream() def encoder = getEncoder().newInstance(bytes) serializer.write(encoder, value) encoder.flush()
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 2.3K bytes - Viewed (0) -
platforms/core-runtime/messaging/src/main/java/org/gradle/internal/remote/internal/hub/DefaultMethodArgsSerializer.java
private final Serializer<Object>[] serializers; ArraySerializer(Serializer<Object>[] serializers) { this.serializers = serializers; } @Override public Object[] read(Decoder decoder) throws Exception { Object[] result = new Object[serializers.length]; for (int i = 0; i < serializers.length; i++) { result[i] = serializers[i].read(decoder);
Registered: 2024-06-12 18:38 - Last Modified: 2023-09-22 08:59 - 3.3K bytes - Viewed (0) -
platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/ComponentSelectorSerializerTest.groovy
when: ModuleComponentSelector result1 = serialize(selector1, serializer) ModuleComponentSelector result2 = serialize(selector2, serializer) ModuleComponentSelector result3 = serialize(selector3, serializer) then: result1.attributes == AttributeTestUtil.attributes("foo": "val1")
Registered: 2024-06-12 18:38 - Last Modified: 2023-10-10 21:10 - 11.8K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/SerializerRegistry.java
* limitations under the License. */ package org.gradle.internal.serialize; public interface SerializerRegistry { /** * Use the given serializer for objects of the given type. * <p> * The provided serializer must be thread-safe and reusable. */ <T> void register(Class<T> implementationType, Serializer<T> serializer); /**
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 1.5K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/SetSerializerTest.groovy
when: def serializer = new SetSerializer(BaseSerializerFactory.LONG_SERIALIZER) then: serialize([1L, 5L, 99L] as Set, serializer) as List == [1L, 5L, 99L] } def "serialize null entry"() { when: def serializer = new SetSerializer(stringSerializer) then: serialize(["one", null, "three"] as Set, serializer) as List == ["one", null, "three"] }
Registered: 2024-06-12 18:38 - Last Modified: 2024-04-15 16:06 - 1.6K bytes - Viewed (0)