| | |
| | | if(clazz.isAnnotationPresent(AnnotationDriver.class)){ |
| | | AnnotationDriver ann = clazz.getAnnotation(AnnotationDriver.class) ; |
| | | if(ann != null){ |
| | | if(ann.enable()){ |
| | | protocolName = ann.name() ; |
| | | if(!(protocolName.trim().equals(""))){ |
| | | if(driverMap.containsKey(protocolName)){ |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if(clazz.isAnnotationPresent(AnnotationPrefixedDataAvailable.class)){ |
| | | AnnotationPrefixedDataAvailable ann = clazz.getAnnotation(AnnotationPrefixedDataAvailable.class) ; |
| | | if(ann != null){ |
| | | if(ann.enable()){ |
| | | protocolName = ann.protocolName() ; |
| | | if(!(protocolName.trim().equals(""))){ |
| | | if(prefixedDataAvailableMap.containsKey(protocolName)){ |
| | |
| | | throw new Exception("严重错误, 上行数据完整性检查所配上报数据的头部最小长度注解不能为0") ; |
| | | } |
| | | */ |
| | | |
| | | prefixedDataAvailableMap.put(protocolName, new AnnotationPrefixedDataAvailableVo(clazz, protocolName, priority, onLineDataMinLength, headMinLength, ProtocolConstant.errorMaxLength)) ; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(clazz.isAnnotationPresent(AnnotationOnLine.class)){ |
| | | AnnotationOnLine ann = clazz.getAnnotation(AnnotationOnLine.class) ; |
| | | if(ann != null){ |
| | | if(ann.enable()){ |
| | | protocolName = ann.protocolName() ; |
| | | if(!(protocolName.trim().equals(""))){ |
| | | if(onLineMap.containsKey(protocolName)){ |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | String error = this.hasErrorInDriver(driverMap) ; |
| | | if(error != null){ |