Package org.gradle.internal.component.external.model

Examples of org.gradle.internal.component.external.model.DefaultModuleComponentArtifactIdentifier


public class ModuleVersionArtifactIdentifierSerializer implements Serializer<ModuleComponentArtifactIdentifier> {
    private final ComponentIdentifierSerializer componentIdentifierSerializer = new ComponentIdentifierSerializer();
    private final MapSerializer<String, String> attributesSerializer = new MapSerializer<String, String>(STRING_SERIALIZER, STRING_SERIALIZER);

    public void write(Encoder encoder, ModuleComponentArtifactIdentifier value) throws Exception {
        DefaultModuleComponentArtifactIdentifier artifact = (DefaultModuleComponentArtifactIdentifier) value;
        componentIdentifierSerializer.write(encoder, artifact.getComponentIdentifier());
        IvyArtifactName ivyArtifactName = artifact.getName();
        encoder.writeString(ivyArtifactName.getName());
        encoder.writeString(ivyArtifactName.getType());
        encoder.writeNullableString(ivyArtifactName.getExtension());
        attributesSerializer.write(encoder, ivyArtifactName.getAttributes());
    }
View Full Code Here


        ModuleComponentIdentifier componentIdentifier = (ModuleComponentIdentifier) componentIdentifierSerializer.read(decoder);
        String artifactName = decoder.readString();
        String type = decoder.readString();
        String extension = decoder.readNullableString();
        Map<String, String> attributes = attributesSerializer.read(decoder);
        return new DefaultModuleComponentArtifactIdentifier(componentIdentifier, artifactName, type, extension, attributes);
    }
View Full Code Here

TOP

Related Classes of org.gradle.internal.component.external.model.DefaultModuleComponentArtifactIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.