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

com.github.peckb1.examples.auto.Fraggle Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package com.github.peckb1.examples.auto;

import com.github.peckb1.examples.auto.fraggles.Boober;
import com.github.peckb1.examples.auto.fraggles.Gobo;
import com.github.peckb1.examples.auto.fraggles.Mokey;
import com.github.peckb1.examples.auto.fraggles.Wembley;
import com.github.peckb1.examples.auto.Fraggle.FraggleName;
import com.github.peckb1.examples.auto.fraggles.Red;
import com.github.peckb1.processor.AutoJackson;
import com.github.peckb1.processor.AutoJacksonTypeClass;
import com.github.peckb1.processor.Named;

import java.util.Optional;

@AutoJackson(type = @AutoJackson.Type(FraggleName.class))
public interface Fraggle {

    FraggleName getName();
    Integer getAge();
    @Named("occupation") String getJob();
    Optional getRoommate();
    M getMuppeteer();

    enum FraggleName {
        GOBO(Gobo.class),
        MOKEY(Mokey.class),
        WEMBLEY(Wembley.class),
        BOOBER(Boober.class),
        RED(Red.class);

        private final Class fraggleClass;

        FraggleName(Class fraggleClass) {
            this.fraggleClass = fraggleClass;
        }

        @AutoJacksonTypeClass
        public Class getFraggleClass() {
            return fraggleClass;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy