aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-03-21 18:33:53 +0100
committer zaaarf <zaaarf@proton.me>2023-03-21 18:33:53 +0100
commit7e0b4e58dd9cf0c3d2f1b120ce21fe986d417f82 (patch)
tree8761fec9ec03d85047c24ac4831d6677387edde8
parentff47129cf3ac12817bf4ca9af8753592298f03e4 (diff)
chore: javadocs
-rw-r--r--src/main/java/ftbsc/lll/proxies/FieldProxy.java1
-rw-r--r--src/main/java/ftbsc/lll/proxies/MethodProxy.java1
-rw-r--r--src/main/java/ftbsc/lll/proxies/QualifiableProxy.java6
-rw-r--r--src/main/java/ftbsc/lll/proxies/TypeProxy.java7
-rw-r--r--src/main/java/ftbsc/lll/tools/DescriptorBuilder.java16
5 files changed, 18 insertions, 13 deletions
diff --git a/src/main/java/ftbsc/lll/proxies/FieldProxy.java b/src/main/java/ftbsc/lll/proxies/FieldProxy.java
index d374bf7..8732997 100644
--- a/src/main/java/ftbsc/lll/proxies/FieldProxy.java
+++ b/src/main/java/ftbsc/lll/proxies/FieldProxy.java
@@ -65,6 +65,7 @@ public class FieldProxy extends AbstractProxy {
* Sets the parent class of this field to the one described by the
* fully qualified name and with the given modifiers.
* @param parentFQN the fully qualified name of the parent
+ * @param modifiers the modifiers of the parent
* @return the builder's state after the change
*/
public Builder setParent(String parentFQN, int modifiers) {
diff --git a/src/main/java/ftbsc/lll/proxies/MethodProxy.java b/src/main/java/ftbsc/lll/proxies/MethodProxy.java
index b4c329a..c906ec7 100644
--- a/src/main/java/ftbsc/lll/proxies/MethodProxy.java
+++ b/src/main/java/ftbsc/lll/proxies/MethodProxy.java
@@ -139,6 +139,7 @@ public class MethodProxy extends AbstractProxy {
* Sets the parent class of this method to the one described by the
* fully qualified name and with the given modifiers.
* @param parentFQN the fully qualified name of the parent
+ * @param modifiers the modifiers of the parent
* @return the builder's state after the change
*/
public Builder setParent(String parentFQN, int modifiers) {
diff --git a/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java b/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java
index adeb83d..885ddc8 100644
--- a/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java
+++ b/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java
@@ -22,7 +22,7 @@ public abstract class QualifiableProxy extends AbstractProxy {
/**
* The protected constructor, should be called by all classes extending this in theirs.
- * @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 {@link QualifiableProxy} representing the parent of this element
* @param fullyQualifiedName the FQN of the element
@@ -36,6 +36,7 @@ public abstract class QualifiableProxy extends AbstractProxy {
/**
* Returns a {@link String} containing the FQN of the parent element
* to this, which may represent a package or class.
+ * @param fqn the fully qualified name of the element
* @return the parent, or null if the parent was the root element
*/
protected static String extractParentFromFQN(String fqn) {
@@ -46,7 +47,8 @@ public abstract class QualifiableProxy extends AbstractProxy {
}
/**
- * Returns a {@link String} containing the simple name of the element
+ * Returns a {@link String} containing the simple name of the element.
+ * @param fqn the fully qualified name of the element
* @return the simple name
*/
protected static String extractSimpleNameFromFQN(String fqn) {
diff --git a/src/main/java/ftbsc/lll/proxies/TypeProxy.java b/src/main/java/ftbsc/lll/proxies/TypeProxy.java
index d621465..f828f11 100644
--- a/src/main/java/ftbsc/lll/proxies/TypeProxy.java
+++ b/src/main/java/ftbsc/lll/proxies/TypeProxy.java
@@ -23,6 +23,7 @@ public class TypeProxy extends QualifiableProxy {
* @param descriptor the descriptor of the class
* @param modifiers the modifiers of the class
* @param parent the package containing this class
+ * @param primitive whether the proxy is a primitive
*/
protected TypeProxy(String name, String descriptor, int modifiers, String parent, boolean primitive) {
super(descriptor, modifiers, PackageProxy.from(parent), String.format("%s.%s", name, parent));
@@ -34,6 +35,7 @@ public class TypeProxy extends QualifiableProxy {
* @param name the name of the class
* @param descriptor the descriptor of the element
* @param modifiers the modifiers of the class
+ * @param primitive whether the proxy is a primitive
* @param containerClass the FQN of the parent class of the class
*/
protected TypeProxy(String name, String descriptor, int modifiers, QualifiableProxy containerClass, boolean primitive) {
@@ -45,6 +47,7 @@ public class TypeProxy extends QualifiableProxy {
* Builds a {@link TypeProxy} from a {@link Type} and modifiers.
* @param type the {@link Type} representing this Class
* @param modifiers the modifiers of the class
+ * @return the builty {@link TypeProxy}
*/
public static TypeProxy from(Type type, int modifiers) {
while(type.getSort() == Type.ARRAY)
@@ -60,11 +63,11 @@ public class TypeProxy extends QualifiableProxy {
/**
* Builds a {@link TypeProxy} given only the fully-qualified name and modifiers.
+ * If present, parent classes will be assumed to have {@code public} as their
+ * only modifier.
* @param fqn the fully qualified name of the desired class
* @param arrayLevel the array level for this type
* @param modifiers the access modifiers of the desired class
- * @implNote If present, parent classes will be assumed to have {@code public} as
- * their only modifier.
* @return the built {@link TypeProxy}
*/
protected static TypeProxy from(String fqn, int arrayLevel, int modifiers) {
diff --git a/src/main/java/ftbsc/lll/tools/DescriptorBuilder.java b/src/main/java/ftbsc/lll/tools/DescriptorBuilder.java
index 252c2a8..1b33790 100644
--- a/src/main/java/ftbsc/lll/tools/DescriptorBuilder.java
+++ b/src/main/java/ftbsc/lll/tools/DescriptorBuilder.java
@@ -32,10 +32,9 @@ public class DescriptorBuilder {
/**
* Sets the return type to the given type.
- * @implNote Passing a {@link Class} may cause problems if used with objects outside
- * the Java SDK. Pass the fully qualified name as a {@link String} rather
- * than the {@link Class} object for non-standard types (such as Minecraft
- * classes).
+ * Passing a {@link Class} may cause problems if used with objects outside the Java
+ * SDK. Pass the fully qualified name as a {@link String} rather than the {@link Class}
+ * object for non-standard types.
* @param returnType the Class object corresponding to the return type
* @return the builder's state after the change
*/
@@ -72,10 +71,9 @@ public class DescriptorBuilder {
/**
* Adds a parameter of the given class type to the method.
* Parameter order matters.
- * @implNote Passing a {@link Class} may cause problems if used with objects outside
- * the Java SDK. Pass the fully qualified name as a {@link String} rather
- * than the {@link Class} object for non-standard types (such as Minecraft
- * classes).
+ * Passing a {@link Class} may cause problems if used with objects outside the Java
+ * SDK. Pass the fully qualified name as a {@link String} rather than the {@link Class}
+ * object for non-standard types.
* @param param the Class object corresponding to the parameter
* @return the builder's state after the change
*/
@@ -114,7 +112,7 @@ public class DescriptorBuilder {
/**
* Builds the descriptor into a string.
- * Example result: int m(Object[] o) -> ([Ljava/lang/Object;)I
+ * Example result: {@code int m(Object[] o)} becomes {@code ([Ljava/lang/Object;)I}
* @return the resulting descriptor
*/
public String build() {