Created
July 12, 2012 02:13
-
-
Save namutaka/3095231 to your computer and use it in GitHub Desktop.
S2Conteinerのコンポーネントをダンプする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyS2Utils { | |
protected Logger logger = LoggerFactory.getLogger("test"); | |
public static void dumpComponent() { | |
S2Container s2Container = (S2Container) SingletonS2ContainerFactory | |
.getContainer().getRoot(); | |
Object result = | |
Traversal.forEachComponent( | |
s2Container, | |
new Traversal.ComponentDefHandler() { | |
public Object processComponent( | |
ComponentDef componentDef) { | |
logger.debug(componentDef.toString() + " - " | |
+ componentDef.getComponentClass() + " - " | |
+ componentDef.getComponentName()); | |
return null; | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment