mirror of
https://github.com/zaaarf/lillero.git
synced 2024-11-21 23:14:51 +01:00
chore: javadocs
This commit is contained in:
parent
ff47129cf3
commit
7e0b4e58dd
5 changed files with 18 additions and 13 deletions
|
@ -65,6 +65,7 @@ public class FieldProxy extends AbstractProxy {
|
||||||
* Sets the parent class of this field to the one described by the
|
* Sets the parent class of this field to the one described by the
|
||||||
* fully qualified name and with the given modifiers.
|
* fully qualified name and with the given modifiers.
|
||||||
* @param parentFQN the fully qualified name of the parent
|
* @param parentFQN the fully qualified name of the parent
|
||||||
|
* @param modifiers the modifiers of the parent
|
||||||
* @return the builder's state after the change
|
* @return the builder's state after the change
|
||||||
*/
|
*/
|
||||||
public Builder setParent(String parentFQN, int modifiers) {
|
public Builder setParent(String parentFQN, int modifiers) {
|
||||||
|
|
|
@ -139,6 +139,7 @@ public class MethodProxy extends AbstractProxy {
|
||||||
* Sets the parent class of this method to the one described by the
|
* Sets the parent class of this method to the one described by the
|
||||||
* fully qualified name and with the given modifiers.
|
* fully qualified name and with the given modifiers.
|
||||||
* @param parentFQN the fully qualified name of the parent
|
* @param parentFQN the fully qualified name of the parent
|
||||||
|
* @param modifiers the modifiers of the parent
|
||||||
* @return the builder's state after the change
|
* @return the builder's state after the change
|
||||||
*/
|
*/
|
||||||
public Builder setParent(String parentFQN, int modifiers) {
|
public Builder setParent(String parentFQN, int modifiers) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ public abstract class QualifiableProxy extends AbstractProxy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The protected constructor, should be called by all classes extending this in theirs.
|
* 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 modifiers the modifiers, as a packed int
|
||||||
* @param parent the {@link QualifiableProxy} representing the parent of this element
|
* @param parent the {@link QualifiableProxy} representing the parent of this element
|
||||||
* @param fullyQualifiedName the FQN of the 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
|
* Returns a {@link String} containing the FQN of the parent element
|
||||||
* to this, which may represent a package or class.
|
* 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
|
* @return the parent, or null if the parent was the root element
|
||||||
*/
|
*/
|
||||||
protected static String extractParentFromFQN(String fqn) {
|
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
|
* @return the simple name
|
||||||
*/
|
*/
|
||||||
protected static String extractSimpleNameFromFQN(String fqn) {
|
protected static String extractSimpleNameFromFQN(String fqn) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class TypeProxy extends QualifiableProxy {
|
||||||
* @param descriptor the descriptor of the class
|
* @param descriptor the descriptor of the class
|
||||||
* @param modifiers the modifiers of the class
|
* @param modifiers the modifiers of the class
|
||||||
* @param parent the package containing this 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) {
|
protected TypeProxy(String name, String descriptor, int modifiers, String parent, boolean primitive) {
|
||||||
super(descriptor, modifiers, PackageProxy.from(parent), String.format("%s.%s", name, parent));
|
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 name the name of the class
|
||||||
* @param descriptor the descriptor of the element
|
* @param descriptor the descriptor of the element
|
||||||
* @param modifiers the modifiers of the class
|
* @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
|
* @param containerClass the FQN of the parent class of the class
|
||||||
*/
|
*/
|
||||||
protected TypeProxy(String name, String descriptor, int modifiers, QualifiableProxy containerClass, boolean primitive) {
|
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.
|
* Builds a {@link TypeProxy} from a {@link Type} and modifiers.
|
||||||
* @param type the {@link Type} representing this Class
|
* @param type the {@link Type} representing this Class
|
||||||
* @param modifiers the modifiers of the class
|
* @param modifiers the modifiers of the class
|
||||||
|
* @return the builty {@link TypeProxy}
|
||||||
*/
|
*/
|
||||||
public static TypeProxy from(Type type, int modifiers) {
|
public static TypeProxy from(Type type, int modifiers) {
|
||||||
while(type.getSort() == Type.ARRAY)
|
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.
|
* 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 fqn the fully qualified name of the desired class
|
||||||
* @param arrayLevel the array level for this type
|
* @param arrayLevel the array level for this type
|
||||||
* @param modifiers the access modifiers of the desired class
|
* @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}
|
* @return the built {@link TypeProxy}
|
||||||
*/
|
*/
|
||||||
protected static TypeProxy from(String fqn, int arrayLevel, int modifiers) {
|
protected static TypeProxy from(String fqn, int arrayLevel, int modifiers) {
|
||||||
|
|
|
@ -32,10 +32,9 @@ public class DescriptorBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the return type to the given type.
|
* Sets the return type to the given type.
|
||||||
* @implNote Passing a {@link Class} may cause problems if used with objects outside
|
* Passing a {@link Class} may cause problems if used with objects outside the Java
|
||||||
* the Java SDK. Pass the fully qualified name as a {@link String} rather
|
* SDK. Pass the fully qualified name as a {@link String} rather than the {@link Class}
|
||||||
* than the {@link Class} object for non-standard types (such as Minecraft
|
* object for non-standard types.
|
||||||
* classes).
|
|
||||||
* @param returnType the Class object corresponding to the return type
|
* @param returnType the Class object corresponding to the return type
|
||||||
* @return the builder's state after the change
|
* @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.
|
* Adds a parameter of the given class type to the method.
|
||||||
* Parameter order matters.
|
* Parameter order matters.
|
||||||
* @implNote Passing a {@link Class} may cause problems if used with objects outside
|
* Passing a {@link Class} may cause problems if used with objects outside the Java
|
||||||
* the Java SDK. Pass the fully qualified name as a {@link String} rather
|
* SDK. Pass the fully qualified name as a {@link String} rather than the {@link Class}
|
||||||
* than the {@link Class} object for non-standard types (such as Minecraft
|
* object for non-standard types.
|
||||||
* classes).
|
|
||||||
* @param param the Class object corresponding to the parameter
|
* @param param the Class object corresponding to the parameter
|
||||||
* @return the builder's state after the change
|
* @return the builder's state after the change
|
||||||
*/
|
*/
|
||||||
|
@ -114,7 +112,7 @@ public class DescriptorBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the descriptor into a string.
|
* 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
|
* @return the resulting descriptor
|
||||||
*/
|
*/
|
||||||
public String build() {
|
public String build() {
|
||||||
|
|
Loading…
Reference in a new issue