Minor code and documentation cleanup. (#4664)

This commit is contained in:
mezz authored and GitHub committed 2018-01-12 23:54:29 -08:00
1 parent 0c0cb2b11a
commit d0bdb23300
52 files changed
+227 -249

No files matched your search

@@ -67,21 +67,21 @@ public @interface Config
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
public @interface LangKey
@interface LangKey
{
String value();
}
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Comment
@interface Comment
{
String[] value();
}
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface RangeInt
@interface RangeInt
{
int min() default Integer.MIN_VALUE;
int max() default Integer.MAX_VALUE;
@@ -89,7 +89,7 @@ public @interface Config
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface RangeDouble
@interface RangeDouble
{
double min() default Double.MIN_VALUE;
double max() default Double.MAX_VALUE;
@@ -97,18 +97,18 @@ public @interface Config
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Name
@interface Name
{
String value();
}
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
public @interface RequiresMcRestart
@interface RequiresMcRestart
{}
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
public @interface RequiresWorldRestart
@interface RequiresWorldRestart
{}
}
@@ -9,27 +9,27 @@ public interface IFieldWrapper
/**
* @return The type adapter to serialize the values returned by getValue. Null if non-primitive.
*/
public ITypeAdapter getTypeAdapter();
ITypeAdapter getTypeAdapter();
/**
* @param field the field about which to retrieve information
* @param instance The instance whose field shall be queried.
* @return a list of keys handled by this field
*/
public String[] getKeys();
String[] getKeys();
public Object getValue(String key);
Object getValue(String key);
public void setValue(String key, Object value);
void setValue(String key, Object value);
public boolean hasKey(String name);
boolean hasKey(String name);
public boolean handlesKey(String name);
boolean handlesKey(String name);
public void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart);
void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart);
/**
* @return the category name in which the entries should be saved.
*/
public String getCategory();
String getCategory();
}