diff --git a/src/main/java/org/byteskript/skript/api/Property.java b/src/main/java/org/byteskript/skript/api/Property.java index 5bdc202..66df0c3 100644 --- a/src/main/java/org/byteskript/skript/api/Property.java +++ b/src/main/java/org/byteskript/skript/api/Property.java @@ -32,7 +32,7 @@ public interface Property extends Referent { default void compile(Context context, Pattern.Match match) throws Throwable { final MethodBuilder method = context.getMethod(); assert method != null; - final Method target = getHandler(StandardHandlers.GET); + final Method target = this.getHandler(StandardHandlers.GET); if (target == null) throw new ScriptCompileError(context.lineNumber(), "Referent has no get handler."); if (target.getReturnType() == void.class) throw new ScriptCompileError(context.lineNumber(), "Referent get handler must not have a void return."); diff --git a/src/main/java/org/byteskript/skript/api/Referent.java b/src/main/java/org/byteskript/skript/api/Referent.java index 720f1a2..3eaedbb 100644 --- a/src/main/java/org/byteskript/skript/api/Referent.java +++ b/src/main/java/org/byteskript/skript/api/Referent.java @@ -17,6 +17,9 @@ import java.lang.reflect.Method; +/** + * This syntax is designed to be set or altered in some way. + */ public interface Referent extends SyntaxElement { Type getHolderType(); diff --git a/src/main/java/org/byteskript/skript/api/SyntaxAnnotationUnwrapper.java b/src/main/java/org/byteskript/skript/api/SyntaxAnnotationUnwrapper.java index 39a3bee..e669a65 100644 --- a/src/main/java/org/byteskript/skript/api/SyntaxAnnotationUnwrapper.java +++ b/src/main/java/org/byteskript/skript/api/SyntaxAnnotationUnwrapper.java @@ -43,14 +43,14 @@ default void generateSyntaxFrom(Class owner) { if (section == null) break entry_section; final GeneratedEntrySection box = new GeneratedEntrySection(this, (Class) owner, section.value()); this.registerSyntax(CompileState.MEMBER_BODY, box); - for (RecordComponent component : owner.getRecordComponents()) { + for (final RecordComponent component : owner.getRecordComponents()) { final EntryNode node = component.getAnnotation(EntryNode.class); if (node == null) continue; final GeneratedEntryNode thing = new GeneratedEntryNode(this, component, node.value()); this.registerSyntax(CompileState.AREA_BODY, thing); } } - for (Method method : owner.getDeclaredMethods()) { + for (final Method method : owner.getDeclaredMethods()) { effect: { final Effect effect = method.getAnnotation(Effect.class); @@ -83,7 +83,7 @@ default void generateSyntaxFrom(Class owner) { void registerProperty(String name, HandlerType type, Method handler); default void registerValues(EventHolder event) { - for (Method method : event.eventClass().getMethods()) { + for (final Method method : event.eventClass().getMethods()) { final EventValue value = method.getAnnotation(EventValue.class); if (value == null) continue; if (method.getParameterTypes().length == 0 && method.getReturnType() != void.class) { diff --git a/src/main/java/org/byteskript/skript/runtime/type/Query.java b/src/main/java/org/byteskript/skript/runtime/type/Query.java index 185737b..c5513e6 100644 --- a/src/main/java/org/byteskript/skript/runtime/type/Query.java +++ b/src/main/java/org/byteskript/skript/runtime/type/Query.java @@ -9,6 +9,6 @@ @FunctionalInterface public interface Query { - boolean check(Object vaue); + boolean check(Object value); }