Add checkstyle rule for javadoc and update all javadocs to 80 cols

This commit is contained in:
Mumfrey committed 2015-01-20 13:49:14 +00:00
1 parent 116ecb0458
commit e87402bf70
49 files changed
+844 -432

No files matched your search

@@ -60,7 +60,8 @@ import org.spongepowered.tools.obfuscation.validation.IMixinValidator;
class AnnotatedMixin {
/**
* Convenience class to store information about an {@link org.spongepowered.asm.mixin.Shadow}ed member's names
* Convenience class to store information about an
* {@link org.spongepowered.asm.mixin.Shadow}ed member's names
*/
class ShadowElementName {
private final boolean hasPrefix;
@@ -295,8 +296,10 @@ class AnnotatedMixin {
}
/**
* Validate method for {@link org.spongepowered.asm.mixin.Shadow} and {@link org.spongepowered.asm.mixin.Overwrite} registrations to check that
* only a single target is registered. Mixins containing annotated methods with these annotations cannot be multi-targetted.
* Validate method for {@link org.spongepowered.asm.mixin.Shadow} and
* {@link org.spongepowered.asm.mixin.Overwrite} registrations to check that
* only a single target is registered. Mixins containing annotated methods
* with these annotations cannot be multi-targetted.
*/
private boolean validateSingleTarget(String annotation, Element element) {
if (this.targetRef == null || this.targets.size() > 1) {
@@ -412,7 +415,8 @@ class AnnotatedMixin {
}
/**
* Register a {@link org.spongepowered.asm.mixin.injection.At} annotation and process the references
* Register a {@link org.spongepowered.asm.mixin.injection.At} annotation
* and process the references
*/
public void registerInjectionPoint(Element element, AnnotationMirror inject, AnnotationMirror at) {
if (!AnnotatedMixins.getRemapValue(at)) {
@@ -60,7 +60,8 @@ import net.minecraftforge.srg2source.rangeapplier.SrgContainer;
/**
* Mixin info manager, stores all of the mixin info during processing and also manages access to the srgs
* Mixin info manager, stores all of the mixin info during processing and also
* manages access to the srgs
*/
class AnnotatedMixins implements Messager {
@@ -124,7 +125,8 @@ class AnnotatedMixins implements Messager {
private SrgContainer srgs;
/**
* True once we've tried to initialise the srgs, initially false so that we can do srg init lazily
* True once we've tried to initialise the srgs, initially false so that we
* can do srg init lazily
*/
private boolean initDone;
@@ -158,7 +160,8 @@ class AnnotatedMixins implements Messager {
}
/**
* Lazy initialisation for srgs, so that we only initialise the srgs if they're actually required.
* Lazy initialisation for srgs, so that we only initialise the srgs if
* they're actually required.
*/
private boolean initSrgs() {
if (!this.initDone) {
@@ -365,7 +368,8 @@ class AnnotatedMixins implements Messager {
*
* @param mixinType Mixin class
* @param method Injector method
* @param inject {@link org.spongepowered.asm.mixin.injection.Inject} annotation
* @param inject {@link org.spongepowered.asm.mixin.injection.Inject}
* annotation
*/
public void registerInjector(TypeElement mixinType, ExecutableElement method, AnnotationMirror inject) {
AnnotatedMixin mixinClass = this.getMixin(mixinType);
@@ -457,7 +461,8 @@ class AnnotatedMixins implements Messager {
}
/**
* Get a TypeElement representing another type in the current processing environment
* Get a TypeElement representing another type in the current processing
* environment
*/
public TypeElement getTypeElement(String name) {
return this.processingEnv.getElementUtils().getTypeElement(name);
@@ -45,7 +45,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.tools.MirrorUtils;
/**
* Annotation processor which finds {@link Inject} and {@link At} annotations in mixin classes and generates SRG mappings
* Annotation processor which finds {@link Inject} and {@link At} annotations in
* mixin classes and generates SRG mappings
*/
@SupportedSourceVersion(SourceVersion.RELEASE_6)
@SupportedAnnotationTypes({
@@ -58,7 +59,9 @@ import org.spongepowered.tools.MirrorUtils;
public class InjectionObfuscationProcessor extends MixinProcessor {
/* (non-Javadoc)
* @see javax.annotation.processing.AbstractProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)
* @see javax.annotation.processing.AbstractProcessor
* #process(java.util.Set,
* javax.annotation.processing.RoundEnvironment)
*/
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@@ -81,7 +84,8 @@ public class InjectionObfuscationProcessor extends MixinProcessor {
}
/**
* Searches for {@link Inject} annotations and registers them with their parent mixins
* Searches for {@link Inject} annotations and registers them with their
* parent mixins
*/
private void processInjectors(RoundEnvironment roundEnv, Class<? extends Annotation> injectorClass) {
for (Element elem : roundEnv.getElementsAnnotatedWith(injectorClass)) {
@@ -42,7 +42,8 @@ public abstract class MixinProcessor extends AbstractProcessor {
protected AnnotatedMixins mixins;
/* (non-Javadoc)
* @see javax.annotation.processing.AbstractProcessor#init(javax.annotation.processing.ProcessingEnvironment)
* @see javax.annotation.processing.AbstractProcessor
* #init(javax.annotation.processing.ProcessingEnvironment)
*/
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
@@ -44,7 +44,8 @@ import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.tools.MirrorUtils;
/**
* Annotation processor which finds {@link Shadow} and {@link Overwrite} annotations in mixin classes and generates SRG mappings
* Annotation processor which finds {@link Shadow} and {@link Overwrite}
* annotations in mixin classes and generates SRG mappings
*/
@SupportedSourceVersion(SourceVersion.RELEASE_6)
@SupportedAnnotationTypes({ "org.spongepowered.asm.mixin.Mixin", "org.spongepowered.asm.mixin.Shadow", "org.spongepowered.asm.mixin.Overwrite" })
@@ -52,7 +53,9 @@ import org.spongepowered.tools.MirrorUtils;
public class TargetObfuscationProcessor extends MixinProcessor {
/* (non-Javadoc)
* @see javax.annotation.processing.AbstractProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)
* @see javax.annotation.processing.AbstractProcessor
* #process(java.util.Set,
* javax.annotation.processing.RoundEnvironment)
*/
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@@ -74,7 +77,8 @@ public class TargetObfuscationProcessor extends MixinProcessor {
}
/**
* Searches for {@link Shadow} annotations and registers them with their parent mixins
* Searches for {@link Shadow} annotations and registers them with their
* parent mixins
*/
private void processShadows(RoundEnvironment roundEnv) {
for (Element elem : roundEnv.getElementsAnnotatedWith(Shadow.class)) {
@@ -97,7 +101,8 @@ public class TargetObfuscationProcessor extends MixinProcessor {
}
/**
* Searches for {@link Overwrite} annotations and registers them with their parent mixins
* Searches for {@link Overwrite} annotations and registers them with their
* parent mixins
*/
private void processOverwrites(RoundEnvironment roundEnv) {
for (Element elem : roundEnv.getElementsAnnotatedWith(Overwrite.class)) {