forked from Anuken/Mindustry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive amount of refactoring for local multiplayer, annotations
- Loading branch information
Showing
47 changed files
with
592 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apply plugin: "java" | ||
|
||
sourceCompatibility = 1.8 | ||
sourceSets.main.java.srcDirs = [ "src/" ] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
|
40 changes: 40 additions & 0 deletions
40
annotations/src/io/anuke/annotations/AnnotationProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.anuke.annotations; | ||
|
||
import javax.annotation.processing.*; | ||
import javax.lang.model.SourceVersion; | ||
import javax.lang.model.element.Element; | ||
import javax.lang.model.element.TypeElement; | ||
import javax.lang.model.util.Elements; | ||
import javax.lang.model.util.Types; | ||
import javax.tools.Diagnostic.Kind; | ||
import java.util.Set; | ||
|
||
@SupportedSourceVersion(SourceVersion.RELEASE_8) | ||
@SupportedAnnotationTypes({ | ||
"java.lang.Override" | ||
}) | ||
public class AnnotationProcessor extends AbstractProcessor { | ||
private Types typeUtils; | ||
private Elements elementUtils; | ||
private Filer filer; | ||
private Messager messager; | ||
|
||
@Override | ||
public synchronized void init(ProcessingEnvironment processingEnv) { | ||
super.init(processingEnv); | ||
typeUtils = processingEnv.getTypeUtils(); | ||
elementUtils = processingEnv.getElementUtils(); | ||
filer = processingEnv.getFiler(); | ||
messager = processingEnv.getMessager(); | ||
} | ||
|
||
@Override | ||
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { | ||
for (Element annotatedElement : roundEnv.getElementsAnnotatedWith(Override.class)) { | ||
messager.printMessage(Kind.ERROR, "an element has the override class: ", annotatedElement); | ||
} | ||
return false; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.