All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmfs.oauth2.client.utils.GrantState Maven / Gradle / Ivy

There is a newer version: 0.22.1
Show newest version
package org.dmfs.oauth2.client.utils;

import org.dmfs.express.json.elementary.Array;
import org.dmfs.express.json.elementary.DelegatingJsonValue;
import org.dmfs.express.json.elementary.Member;
import org.dmfs.express.json.elementary.Object;
import org.dmfs.jems2.iterable.Mapped;
import org.dmfs.jems2.iterable.Seq;
import org.dmfs.oauth2.client.OAuth2InteractiveGrant;


public final class GrantState extends DelegatingJsonValue
{
    public GrantState(Class factoryClass, String... arguments)
    {
        this(factoryClass, new Seq<>(arguments));
    }


    public GrantState(Class factoryClass, Iterable arguments)
    {
        super(new Object(
            new Member("class", factoryClass.getName()),
            new Member("args", new Array(new Mapped<>(org.dmfs.express.json.elementary.String::new, arguments)))));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy