summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/data/FieldData.java
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-01-24 17:35:09 +0100
committer zaaarf <me@zaaarf.foo>2024-01-24 17:35:09 +0100
commit16508aff77569c683baaaf42d32cf482b6a8a386 (patch)
treed25dea27a5b34990e47efd072b3cda778930cdbd /src/main/java/ftbsc/lll/mapper/data/FieldData.java
parentae63aef390db222448787db5f5998e77fc46bd2a (diff)
chore: version bump + internal reorganisation0.4.0
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/data/FieldData.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/data/FieldData.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/data/FieldData.java b/src/main/java/ftbsc/lll/mapper/data/FieldData.java
new file mode 100644
index 0000000..3e6cf6c
--- /dev/null
+++ b/src/main/java/ftbsc/lll/mapper/data/FieldData.java
@@ -0,0 +1,55 @@
+package ftbsc.lll.mapper.data;
+
+/**
+ * Container class for method data.
+ */
+public class FieldData {
+ /**
+ * The internal name of the parent class.
+ */
+ public final ClassData parentClass;
+
+ /**
+ * The name of the method.
+ */
+ public final String name;
+
+ /**
+ * The name mapped.
+ */
+ public final String nameMapped;
+
+ /**
+ * The field's type descriptor.
+ * Some formats may not specify it; if this was created in one such format,
+ * this is going to be null.
+ */
+ public final String descriptor;
+
+ /**
+ * Constructs a new {@link FieldData} with unspecified descriptor.
+ * @param parentClass the {@link ClassData} representation of the parent class
+ * @param name the field name
+ * @param nameMapped the mapped field name
+ */
+ public FieldData(ClassData parentClass, String name, String nameMapped) {
+ this.parentClass = parentClass;
+ this.name = name;
+ this.nameMapped = nameMapped;
+ this.descriptor = null;
+ }
+
+ /**
+ * Constructs a new {@link FieldData} with descriptor.
+ * @param parentClass the {@link ClassData} representation of the parent class
+ * @param name the field name
+ * @param nameMapped the mapped field name
+ * @param descriptor the field's type descriptor
+ */
+ public FieldData(ClassData parentClass, String name, String nameMapped, String descriptor) {
+ this.parentClass = parentClass;
+ this.name = name;
+ this.nameMapped = nameMapped;
+ this.descriptor = descriptor;
+ }
+}