This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flexjson.JSONDeserializer; | |
public class Person<T extends Detail> { | |
private String name; | |
private int age; | |
private T detail; | |
public String getName() { | |
return name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import flexjson.JSONSerializer; | |
public class Human { | |
private String name; | |
private List<String> hobbies; //このフィールドをJSONに含めたい | |
public String getName() { | |
return name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void updateConfigure() throws JoranException { | |
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); | |
ContextInitializer ci = new ContextInitializer(loggerContext); | |
JoranConfigurator configurator = new JoranConfigurator(); | |
configurator.setContext(loggerContext); | |
loggerContext.reset(); | |
configurator.doConfigure(ci.findURLOfDefaultConfigurationFile(false)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flexjson.JSONDeserializer; | |
import flexjson.JSONSerializer; | |
public class Hoge { | |
private Color color; | |
public Hoge(){} | |
public Color getColor() { | |
return color; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Circle implements Figure { | |
private Type type; | |
private int radius; | |
public Circle(){ | |
type = Type.CIRCLE; | |
} | |
public Type getType() { | |
return type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> list = Stream.generate(() -> "hoge").limit(10).collect(Collectors.toList()); |