You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jv...@locus.apache.org on 2000/08/30 22:54:41 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/introspection NOTES
jvanzyl 00/08/30 13:54:40
Added: src/java/org/apache/velocity/introspection NOTES
Log:
- just some notes on how WM introspection is being used.
Revision Changes Path
1.1 jakarta-velocity/src/java/org/apache/velocity/introspection/NOTES
Index: NOTES
===================================================================
This method was taken from Context.java in WM. This
is how we'll probably be using it most of the time.
I've left all the bean stuff in the introspection
engine, so we'll come to beans when we get there.
I'm basically just using the //*** type way
to get a value because everything right now in
Velcity is what WM calls a local variable.
/**
* Get the named local variable via introspection. This is
* an advanced-use method.
*/
public final Object getLocal(final Object[] names)
throws PropertyException, ContextException
{
int len = names.length;
if ((_locals == null) || (len == 0)) {
return null;
} else {
Object res = get(names[0]);
if (len == 1) {
return res;
} else if (res == null) {
return null;
} else {
//***
return PropertyOperator.getProperty(this,res,names,1);
}
}
}