|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.util.RefUtils
public class RefUtils
Utilities for reflection.
Constructor Summary | |
---|---|
RefUtils()
|
Method Summary | |
---|---|
static java.lang.Object |
modify(java.lang.Object obj,
java.lang.String modifications)
Returns a modified copy of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RefUtils()
Method Detail |
---|
public static java.lang.Object modify(java.lang.Object obj, java.lang.String modifications)
modifications
- a comma or semi-colon separated list of
strings of the form LHS=RHS, where RHS is something that can be
passed to toObject(), and LHS is a period-separated chain of
getters/setters, where only the last item is a setter.
Example:
RefUtils.modify(
new StackedSequenceLearner(new MaxEntLearner(),1),
is the same as:
"params.historySize=1,params.futureSize=0")
StackedSequenceLearner a = new StackedSequenceLearner(new MaxEntLearner(),1);
a.getParams().setHistorySize(1);
a.getParams().setFutureSize(0);
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |