---
title: "Calling static methods on metaclass"
author: "boogie"
date: "2008-06-15T09:37:26Z"
tags: []
slug: "calling-static-methods-on-metaclass"
draft: false
lastmod: "2008-06-15T09:37:26Z"
id: 203427
url: "https://boogie.iteye.com/blog/203427"
---

**1、MyClass with a static method**

**`class MyClass { static processList(list) { // does something } }`**

 

**2、[Calling static method processList]()**

**`doProcessList(String className, list) { MetaClass mc = GroovySystem.metaClassRegistry.getMetaClass(Class.forName(className)) mc.invokeStaticMethod(‘processList’, list) }`**