chore: javadocs

This commit is contained in:
zaaarf 2023-03-21 18:33:53 +01:00
parent ff47129cf3
commit 7e0b4e58dd
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
5 changed files with 18 additions and 13 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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() {