Java 类org.apache.logging.log4j.core.config.plugins.validation.constraints.ValidHost 实例源码

项目:logging-log4j2    文件:ValidHostValidator.java   
@Override
public void initialize(final ValidHost annotation) {
    this.annotation = annotation;
}
项目:logging-log4j2    文件:HostAndPort.java   
@PluginFactory
public static HostAndPort createPlugin(
    @ValidHost(message = "Unit test (host)") @PluginAttribute("host") final String host,
    @ValidPort(message = "Unit test (port)") @PluginAttribute("port") final int port) {
    return new HostAndPort(new InetSocketAddress(host, port));
}