Skip to content

Commit

Permalink
add somme doc to remove deployement warnings (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh authored Mar 18, 2024
1 parent def22d8 commit 8346cf4
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 26 deletions.
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

0 comments on commit 8346cf4

Please sign in to comment.