Skip to content

add somme doc to remove deployement warnings #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions accessors-smart/src/main/java/net/minidev/asm/ASMUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
* @author uriel Chemouni
*/
public class ASMUtil {
/**
* default constructor
*/
public ASMUtil() {
super();
}
/**
* Append the call of proper autoboxing method for the given primitive type.
*
Expand Down
57 changes: 32 additions & 25 deletions accessors-smart/src/main/java/net/minidev/asm/BasicFiledFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,59 @@
* It serves as a default or fallback strategy when no specific field filtering logic is required.
*/
public class BasicFiledFilter implements FieldFilter {
/**
* A singleton instance of {@code BasicFieldFilter}.
* Since the filter does not maintain any state and allows all operations, it can be reused across the application.
*/
/**
* default constructor
*/
public BasicFiledFilter() {
super();
}

/**
* A singleton instance of {@code BasicFieldFilter}.
* Since the filter does not maintain any state and allows all operations, it can be reused across the application.
*/
public final static BasicFiledFilter SINGLETON = new BasicFiledFilter();

/**
* Always allows using the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
* Always allows using the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
@Override
public boolean canUse(Field field) {
return true;
}

/**
* Always allows using the specified field in conjunction with a method.
*
* @param field The field to check.
* @param method The method to check. This parameter is not used in the current implementation.
* @return Always returns {@code true}.
*/
* Always allows using the specified field in conjunction with a method.
*
* @param field The field to check.
* @param method The method to check. This parameter is not used in the current implementation.
* @return Always returns {@code true}.
*/
@Override
public boolean canUse(Field field, Method method) {
return true;
}

/**
* Always allows reading the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
* Always allows reading the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
@Override
public boolean canRead(Field field) {
return true;
}

/**
* Always allows writing to the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
* Always allows writing to the specified field.
*
* @param field The field to check.
* @return Always returns {@code true}.
*/
@Override
public boolean canWrite(Field field) {
return true;
Expand Down
10 changes: 10 additions & 0 deletions accessors-smart/src/main/java/net/minidev/asm/BeansAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@
* @author uriel Chemouni
*/
public abstract class BeansAccess<T> {
/**
* default constuctor
*/
public BeansAccess() {
super();
}

private HashMap<String, Accessor> map;
private Accessor[] accs;

/**
* set Accessor
* @param accs Accessor list
*/
protected void setAccessor(Accessor[] accs) {
Expand All @@ -45,13 +53,15 @@ protected void setAccessor(Accessor[] accs) {
}

/**
* get internal map
* @return a map
*/
public HashMap<String, Accessor> getMap() {
return map;
}

/**
* get internal accessor
* @return Accessor list
*/
public Accessor[] getAccessors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,21 @@ public BeansAccessBuilder(Class<?> type, Accessor[] accs, DynamicClassLoader loa
this.accessClassNameInternal = accessClassName.replace('.', '/');
this.classNameInternal = className.replace('.', '/');
}

/**
* register multiple new conversion
* @param conv conv list
*/
public void addConversion(Iterable<Class<?>> conv) {
if (conv == null)
return;
for (Class<?> c : conv)
addConversion(c);
}

/**
* Resister a new conversion
* @param conv the conv
*/
public void addConversion(Class<?> conv) {
if (conv == null)
return;
Expand All @@ -106,6 +113,10 @@ public void addConversion(Class<?> conv) {
}
}

/**
* build the conversion class.
* @return the new Class
*/
public Class<?> bulid() {
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
MethodVisitor mv;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
import java.util.HashMap;
import java.util.LinkedHashSet;

/**
* Beans Access Config
*/
public class BeansAccessConfig {
/**
* default constructor
*/
public BeansAccessConfig() {
super();
}
/**
* Field type convertor for all classes
*
Expand Down
13 changes: 13 additions & 0 deletions accessors-smart/src/main/java/net/minidev/asm/ConvertDate.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
* It handles different month and day names across languages, and supports timezone adjustments.
*/
public class ConvertDate {
/**
* default constructor
*/
public ConvertDate() {
super();
}
static TreeMap<String, Integer> monthsTable = new TreeMap<String, Integer>(new StringCmpNS()); // StringCmpNS.COMP
static TreeMap<String, Integer> daysTable = new TreeMap<String, Integer>(new StringCmpNS()); // StringCmpNS.COMP
private static HashSet<String> voidData = new HashSet<String>();
Expand All @@ -27,6 +33,13 @@ public class ConvertDate {
* Comparator for case-insensitive string comparison. Used for sorting and comparing month and day names.
*/
public static class StringCmpNS implements Comparator<String> {
/**
* default constructor
*/
public StringCmpNS() {
super();
}

@Override
public int compare(String o1, String o2) {
return o1.compareToIgnoreCase(o2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
*/
public class DefaultConverter {
/**
* Default constructor
*/
public DefaultConverter() {
super();
}
/**
* Converts the given object to an {@code int}.
*
* @param obj the object to convert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface FieldFilter {
public boolean canUse(Field field);

/**
* Can the field be used
*
* @param field the field
* @param method the method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
public class NoSuchFieldException extends RuntimeException {
private static final long serialVersionUID = 1L;

/**
* default constructor
*/
public NoSuchFieldException() {
super();
}

/**
* constuctor from message.
* @param message the detail message. The detail message is saved for
* later retrieval by the Throwable.getMessage() method.
*/
Expand Down