summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/proxies/AbstractProxy.java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-03-21 18:24:29 +0100
committer zaaarf <zaaarf@proton.me>2023-03-21 18:24:29 +0100
commitff47129cf3ac12817bf4ca9af8753592298f03e4 (patch)
tree49fbdf8b1ca388747a2893c25176c69186431e75 /src/main/java/ftbsc/lll/proxies/AbstractProxy.java
parent884cefead9e4fede7243650afc4f22f08f8e5090 (diff)
feat: restored flat descriptors, implemented primitive proxies
Diffstat (limited to 'src/main/java/ftbsc/lll/proxies/AbstractProxy.java')
-rw-r--r--src/main/java/ftbsc/lll/proxies/AbstractProxy.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/java/ftbsc/lll/proxies/AbstractProxy.java b/src/main/java/ftbsc/lll/proxies/AbstractProxy.java
index 93eaec8..d60f3d5 100644
--- a/src/main/java/ftbsc/lll/proxies/AbstractProxy.java
+++ b/src/main/java/ftbsc/lll/proxies/AbstractProxy.java
@@ -15,9 +15,9 @@ public abstract class AbstractProxy {
public final String name;
/**
- * The {@link Type} corresponding to this element.
+ * The descriptor for this element.
*/
- public final Type type;
+ public final String descriptor;
/**
* The fully qualified name (i.e. java.lang.String) of
@@ -34,13 +34,13 @@ public abstract class AbstractProxy {
/**
* The private constructor, should be called by all classes extending this in theirs.
* @param name the name of the element
- * @param type the {@link Type} for the element
+ * @param descriptor the descriptor for the element
* @param modifiers the modifiers, as a packed int
* @param parent the FQN of the parent class
*/
- protected AbstractProxy(String name, Type type, int modifiers, QualifiableProxy parent) {
+ protected AbstractProxy(String name, String descriptor, int modifiers, QualifiableProxy parent) {
this.name = name;
- this.type = type;
+ this.descriptor = descriptor;
this.modifiers = modifiers;
this.parent = parent;
}
@@ -57,7 +57,7 @@ public abstract class AbstractProxy {
return p.parent.equals(this.parent)
&& p.name.equals(this.name)
&& p.modifiers == this.modifiers
- && p.type.equals(this.type);
+ && p.descriptor.equals(this.descriptor);
} else return false;
}
@@ -83,9 +83,9 @@ public abstract class AbstractProxy {
protected QualifiableProxy parent;
/**
- * The {@link Type} corresponding to the element.
+ * The descriptor of the element.
*/
- protected Type type;
+ protected String descriptor;
/**
* The constructor.
@@ -124,21 +124,21 @@ public abstract class AbstractProxy {
}
/**
- * @param type the {@link Type} corresponding to the element
- * @return the current state of the builder
+ * Sets {@link Type} for this element from the descriptor, passed as a {@link String}.
+ * @param descriptor the descriptor passed as a {@link String}
+ * @return the builder's state after the change
*/
- public Builder<T> setType(Type type) {
- this.type = type;
+ public Builder<T> setDescriptor(String descriptor) {
+ this.descriptor = descriptor;
return this;
}
/**
- * Sets {@link Type} for this element from the descriptor, passed as a {@link String}.
- * @param descriptor the descriptor passed as a {@link String}
- * @return the builder's state after the change
+ * @param type the {@link Type} corresponding to the element
+ * @return the current state of the builder
*/
- public Builder<T> setDescriptor(String descriptor) {
- return this.setType(Type.getType(descriptor));
+ public Builder<T> setType(Type type) {
+ return this.setDescriptor(type.getDescriptor());
}
/**