EOEntity entity = EOModelGroup.defaultModelGroup().entityNamed(entityName);
Class class = _NSUtilities.classWithName(entity.className());
Method method = class.getMethod(methodName, parameterTypes);
method.invoke(null, parameters); //null target for static methods

You could do it through java’s reflection APIs, but that sounds really fishy. 
Maybe if you explain what you are trying to accomplish, we could offer better 
insight. For instance, you may be better served using the clazz pattern if you 
want static methods you can override.



On Dec 9, 2014, at 8:37 AM, James Cicenia <ja...@jimijon.com> wrote:

> 
> I have a string that is an EntityName.
> I want to run that entity’s static class method.
> 
> do I have to do this?:
> 
>         EOEnterpriseObject myClass = EOUtilities.createAndInsertInstance( ec, 
> entityName) ;
> 
> I really don’t want to create an instance.
> 
> Thanks
> James
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
> 
> This email sent to rgur...@smarthealth.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to