diff --git a/compiler/compiler-core/src/main/java/io/github/paullo612/mlfx/compiler/elements/IdentifiableFXMLElement.java b/compiler/compiler-core/src/main/java/io/github/paullo612/mlfx/compiler/elements/IdentifiableFXMLElement.java index c03e858..7f1507a 100644 --- a/compiler/compiler-core/src/main/java/io/github/paullo612/mlfx/compiler/elements/IdentifiableFXMLElement.java +++ b/compiler/compiler-core/src/main/java/io/github/paullo612/mlfx/compiler/elements/IdentifiableFXMLElement.java @@ -15,7 +15,6 @@ */ package io.github.paullo612.mlfx.compiler.elements; -import com.sun.javafx.beans.IDProperty; import io.github.paullo612.mlfx.compiler.CompilerContext; import io.github.paullo612.mlfx.compiler.ProcessingInstructions; import io.github.paullo612.mlfx.expression.ExpressionContext; @@ -30,6 +29,8 @@ // FXML element that can be identified. Can have id assigned, so, can be referenced anywhere in FXML file. abstract class IdentifiableFXMLElement extends LoadableFXMLElement> { + private static final String ID_PROPERTY_ANNOTATION = "com.sun.javafx.beans.IDProperty"; + private int slot = -1; private boolean hasId; @@ -77,10 +78,10 @@ private void doSetIdProperty(CompilerContext context, String id, MethodElement s private void setIdProperty(CompilerContext context, String id) { ClassElement classElement = getClassElement(); - AnnotationValue annotation = classElement.getAnnotation(IDProperty.class); + AnnotationValue annotation = classElement.getAnnotation(ID_PROPERTY_ANNOTATION); if (annotation == null) { - // No ID property present, noting to do here. + // No ID property present, nothing to do here. return; }