Unverified Commit fbac8078 authored by Martin Monperrus's avatar Martin Monperrus Committed by GitHub
Browse files

refactor(template/Parameters): remove useless method NIL (#3646)

parent eeeafecd
......@@ -288,29 +288,6 @@ public abstract class Parameters {
return templateParameterType;
}
/**
* Creates an empty template parameter of the <code>T</code> type where
* {@link TemplateParameter#S()} does not return <code>null</code> in case
* the template code needs to be executed such as in static initializers.
*/
@SuppressWarnings("unchecked")
public static <T> TemplateParameter<T> NIL(Class<? extends T> type) {
if (Number.class.isAssignableFrom(type)) {
return (TemplateParameter<T>) new TemplateParameter<Number>() {
@Override
public Number S() {
return 0;
}
};
}
return new TemplateParameter<T>() {
@Override
public T S() {
return null;
}
};
}
/**
* returns all the runtime fields of a template representing a template parameter
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment