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

com.jsoniter.spi.ConstructorDescriptor Maven / Gradle / Ivy

Go to download

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go

The newest version!
package com.jsoniter.spi;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

public class ConstructorDescriptor {
    /**
     * set to null if use constructor
     * otherwise use static method
     */
    public String staticMethodName;
    // option 1: use constructor
    public Constructor ctor;
    // option 2: use static method
    public Method staticFactory;
    // option 3: create by extension
    public Extension objectFactory;

    /**
     * the parameters to call constructor or static method
     */
    public List parameters = new ArrayList();

    @Override
    public String toString() {
        return "ConstructorDescriptor{" +
                "staticMethodName='" + staticMethodName + '\'' +
                ", ctor=" + ctor +
                ", staticFactory=" + staticFactory +
                ", parameters=" + parameters +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy