diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8145cf4..d8a0a16 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,10 @@ - + + + + @@ -513,10 +517,10 @@ - + - + @@ -641,14 +645,6 @@ - - - - - - - - @@ -693,6 +689,22 @@ + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/github/git_leon/class_assembly_generator/utils/ClassDescriber.java b/src/main/java/com/github/git_leon/class_assembly_generator/utils/ClassDescriber.java index adf9d8f..1f20226 100644 --- a/src/main/java/com/github/git_leon/class_assembly_generator/utils/ClassDescriber.java +++ b/src/main/java/com/github/git_leon/class_assembly_generator/utils/ClassDescriber.java @@ -5,12 +5,12 @@ */ public class ClassDescriber { private final Class cls; - private final Modifiers modifiers; + private final ModifierSpy modifiers; private String description; public ClassDescriber(Class cls) { this.cls = cls; - this.modifiers = new Modifiers(cls); + this.modifiers = new ModifierSpy(cls); } public String toString() { diff --git a/src/main/java/com/github/git_leon/class_assembly_generator/utils/FieldDescriber.java b/src/main/java/com/github/git_leon/class_assembly_generator/utils/FieldDescriber.java index 5b71ecc..59a55af 100644 --- a/src/main/java/com/github/git_leon/class_assembly_generator/utils/FieldDescriber.java +++ b/src/main/java/com/github/git_leon/class_assembly_generator/utils/FieldDescriber.java @@ -12,7 +12,7 @@ public FieldDescriber(Field field) { this.field = field; } public String toString() { - Modifiers modifiers = new Modifiers(field); + ModifierSpy modifiers = new ModifierSpy(field); String description = "declare %s %s field named `%s` of type `%s`. The field has `%s` accessibility."; return String.format(description, modifiers.getStaticism(), diff --git a/src/main/java/com/github/git_leon/class_assembly_generator/utils/MethodDescriber.java b/src/main/java/com/github/git_leon/class_assembly_generator/utils/MethodDescriber.java index ea724d2..1b70e0f 100644 --- a/src/main/java/com/github/git_leon/class_assembly_generator/utils/MethodDescriber.java +++ b/src/main/java/com/github/git_leon/class_assembly_generator/utils/MethodDescriber.java @@ -11,7 +11,7 @@ public class MethodDescriber { public MethodDescriber(Method method) { this.method = method; - this.description = new Modifiers(method).isAbstract() ? "Declare " : "Define "; + this.description = new ModifierSpy(method).isAbstract() ? "Declare " : "Define "; } public String toString() { diff --git a/src/main/java/com/github/git_leon/class_assembly_generator/utils/Modifiers.java b/src/main/java/com/github/git_leon/class_assembly_generator/utils/ModifierSpy.java similarity index 83% rename from src/main/java/com/github/git_leon/class_assembly_generator/utils/Modifiers.java rename to src/main/java/com/github/git_leon/class_assembly_generator/utils/ModifierSpy.java index 2cf5ed1..0276cda 100644 --- a/src/main/java/com/github/git_leon/class_assembly_generator/utils/Modifiers.java +++ b/src/main/java/com/github/git_leon/class_assembly_generator/utils/ModifierSpy.java @@ -8,28 +8,26 @@ /** * Created by leon on 9/29/17. */ -public class Modifiers { +public class ModifierSpy { private final String modifiers; - private String staticism; - private String finalism; - public Modifiers(int modifiers) { + public ModifierSpy(int modifiers) { this.modifiers = Modifier.toString(modifiers); } - public Modifiers(Class c) { + public ModifierSpy(Class c) { this(c.getModifiers()); } - public Modifiers(Field f) { + public ModifierSpy(Field f) { this(f.getModifiers()); } - public Modifiers(Method m) { + public ModifierSpy(Method m) { this(m.getModifiers()); } - public Modifiers(Parameter p) { + public ModifierSpy(Parameter p) { this(p.getModifiers()); }