今天就跟大家聊聊有关java中继承的作用是什么,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
公司专注于为企业提供成都网站设计、成都做网站、微信公众号开发、商城系统网站开发,微信平台小程序开发,软件按需搭建网站等一站式互联网企业服务。凭借多年丰富的经验,我们会仔细了解各客户的需求而做出多方面的分析、设计、整合,为客户设计出具风格及创意性的商业解决方案,创新互联公司更提供一系列网站制作和网站推广的服务。
public class ConfigureDefinition implements Serializable { private final static Logger LOGGER = LoggerFactory.getLogger(ConfigureDefinition.class); public static String valicateErrorMessage; public TaskNodeDefinition addConfiguration(Object json,TaskNodeDefinition target){ LOGGER.info("--->ConfigureDefinition addConfiguration() the [task node]<taskNode:{}>", target.toString()); return target; } public TaskNodeDefinition processConfiguration(TaskNodeDefinition taskNodeDefinition) throws Exception{ LOGGER.info("--->ConfigureDefinition processConfiguration() the [task node]<taskNode:{}>", taskNodeDefinition.toString()); validate(taskNodeDefinition); return taskNodeDefinition; } public boolean validate(TaskNodeDefinition taskNodeDefinition) { LOGGER.info("--->ConfigureDefinition validate() the [task node]<taskNode:{}>", taskNodeDefinition.toString()); return true; } public String validateReturnMessage(TaskNodeDefinition taskNodeDefinition){ LOGGER.info("--->ConfigureDefinition validateReturnMessage() the [task node]<taskNode:{}>", taskNodeDefinition.toString()); validate(taskNodeDefinition); return valicateErrorMessage; } }
public class HttpRequestConfig extends ConfigureDefinition { private final static Logger LOGGER = LoggerFactory.getLogger(HttpRequestConfig.class); @Override public TaskNodeDefinition addConfiguration(Object json,TaskNodeDefinition target){ LOGGER.info("---> HttpRequestConfig addConfiguration() the [HTTP Request]<taskNode:{}> <{}>", target.getTaskId(),json); JSONObject jsonObject= JSONObject.fromObject(json); HttpRequestDefinition httpRequestDefinition=(HttpRequestDefinition)JSONObject.toBean(jsonObject, HttpRequestDefinition.class); target.setConfigure(httpRequestDefinition); return target; } @Override public TaskNodeDefinition processConfiguration(TaskNodeDefinition taskNodeDefinition) throws Exception { return super.processConfiguration(taskNodeDefinition); } @Override public boolean validate(TaskNodeDefinition taskNodeDefinition) { LOGGER.info("--->HttpRequestConfig validate() the [HTTP Request]<taskNode:{}>", taskNodeDefinition.toString()); if (Objects.isNull(taskNodeDefinition.getConfigure()) || Objects.isNull(taskNodeDefinition.getConfigure()) || Objects.isNull(((HttpRequestDefinition)taskNodeDefinition.getConfigure()).getGeneral()) || StringUtils.isAnyBlank(((HttpRequestDefinition)taskNodeDefinition.getConfigure()).getGeneral().getMethod(), ((HttpRequestDefinition)taskNodeDefinition.getConfigure()).getGeneral().getPath(), ((HttpRequestDefinition)taskNodeDefinition.getConfigure()).getGeneral().getAccessKeyId())) { valicateErrorMessage="You must specify a value in the following fields: method、path、accessKeyId"; return false; } valicateErrorMessage=null; return true; } @Override public String validateReturnMessage(TaskNodeDefinition taskNodeDefinition){ LOGGER.info("--->HttpRequestConfig validateReturnMessage() the [HTTP Request]<taskNode:{}>", taskNodeDefinition.toString()); validate(taskNodeDefinition); return valicateErrorMessage; }
public class HttpRequestDefinition extends HttpRequestConfig implements Serializable { private GeneralDefinition general; private RequestDefinition request; private ResponseDefinition response; public GeneralDefinition getGeneral() { return general; } public void setGeneral(GeneralDefinition general) { this.general = general; } public RequestDefinition getRequest() { return request; } public void setRequest(RequestDefinition request) { this.request = request; } public ResponseDefinition getResponse() { return response; } public void setResponse(ResponseDefinition response) { this.response = response; } }
看完上述内容,你们对java中继承的作用是什么有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注创新互联行业资讯频道,感谢大家的支持。
网站名称:java中继承的作用是什么
转载源于:https://www.cdcxhl.com/article30/jcipso.html
成都网站建设公司_创新互联,为您提供域名注册、外贸网站建设、网站收录、微信公众号、营销型网站建设、自适应网站
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联