import org.sonatype.plexus.build.incremental.BuildContext;
public final class CodeGeneratorImpl implements BasicCodeGenerator, BuildContextAware, MavenProjectAware {
- private static final Logger logger = LoggerFactory.getLogger(CodeGeneratorImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(CodeGeneratorImpl.class);
private static final String FS = File.separator;
private BuildContext buildContext;
private File projectBaseDir;
// TODO: do not mutate parameters, output of a method is defined by its return value
Set<File> moduleInfoProviders = generateYangModuleInfo(outputBaseDir, module, context, currentProvidersBuilder);
ImmutableSet<String> currentProviders = currentProvidersBuilder.build();
- logger.info("Adding ModuleInfo providers {}", currentProviders);
+ LOG.info("Adding ModuleInfo providers {}", currentProviders);
bindingProviders.addAll(currentProviders);
result.addAll(moduleInfoProviders);
}
File outputBaseDir;
outputBaseDir = new File(DEFAULT_OUTPUT_BASE_DIR_PATH);
setOutputBaseDirAsSourceFolder(outputBaseDir, mavenProject);
- logger.debug("Adding " + outputBaseDir.getPath() + " as compile source root");
+ LOG.debug("Adding " + outputBaseDir.getPath() + " as compile source root");
return outputBaseDir;
}
bw.write(source);
}
} catch (Exception e) {
- logger.error("Could not write file: {}",file,e);
+ LOG.error("Could not write file: {}",file,e);
}
} catch (Exception e) {
- logger.error("Could not create file: {}",file,e);
+ LOG.error("Could not create file: {}",file,e);
}
return file;
}
private static final Pattern ROOT_PACKAGE_PATTERN = Pattern.compile(ROOT_PACKAGE_PATTERN_STRING);
private static final Logger LOG = LoggerFactory.getLogger(BindingReflections.class);
- private static final LoadingCache<Class<?>, Optional<QName>> classToQName = CacheBuilder.newBuilder() //
+ private static final LoadingCache<Class<?>, Optional<QName>> CLASS_TO_QNAME = CacheBuilder.newBuilder() //
.weakKeys() //
.expireAfterAccess(EXPIRATION_TIME, TimeUnit.SECONDS) //
.build(new ClassToQNameLoader());
* May return null if QName is not present.
*/
public static final QName findQName(final Class<?> dataType) {
- return classToQName.getUnchecked(dataType).orNull();
+ return CLASS_TO_QNAME.getUnchecked(dataType).orNull();
}
/**