aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/tools/data/FieldData.java
blob: e239d66dfe80b75dc8c70ee1450d806ffb2bb66e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

package ftbsc.lll.mapper.tools.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;
   }
}