I'm trying out:

        final Method methods[] = cls.getMethods();
        for (Method method : methods) {
            FacetUtil.addFacet(new DisabledObjectFacetViaDisabledMethod(method, 
facetHolder));
        }

Is a bit overkill, as it'll effectively be annotating all the Isis methods as 
well! (validateXXX, etc).

On 5 Dec 2011 at 12:06, Kevin Meyer - KMZ wrote:

> Hi Dan,
> 
> I'm trying to implement your alternate suggestion, but I'm having 
> issues.
> 
> On 3 Dec 2011 at 7:03, Dan Haywood wrote:
> 
> > final Method method =
> >     MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, DISABLED_PREFIX,
> > String.class, NO_PARAMETERS_TYPES);
> > 
> > for(ObjectMember member: objectSpec.getMembers()) {
> 
> No such method as getMembers() on ObjectSpecification.
> 
> >   FacetUtil.addFacet(new DisabledObjectFacetViaDisabledMethod(method,
> > member);
> > }
> 
> In fact, there is no such method anywhere except in the json applib.
> 
> I'm trying to fetch ObjectMember based on Method... but that's not 
> looking good either! :)
> 
> I understand what you're suggesting, I'm just having difficulties making 
> it so!
> 
> Regards,
> Kevin
> 


--
Kevin Meyer, PhD, Pr.Sci.Nat
KMZ             P.O. Box 9822, Sharon Park, South Africa.
Tel: +27 11 363 2001    Cell: +27 83 346 3045


Reply via email to