Example usage for org.apache.wicket.core.util.lang WicketObjects newInstance

List of usage examples for org.apache.wicket.core.util.lang WicketObjects newInstance

Introduction

In this page you can find the example usage for org.apache.wicket.core.util.lang WicketObjects newInstance.

Prototype

public static <T> T newInstance(final String className) 

Source Link

Document

Creates a new instance using the current application's class resolver.

Usage

From source file:org.wicketstuff.wicket.mount.core.AutoMounter.java

License:Apache License

public static boolean mountAll(WebApplication app) {
    final String mapInfoClassName = app.getClass().getCanonicalName() + "MountInfo";
    try {/*  ww  w  .j a  v a  2s.c o  m*/
        final MountInfo mountInfo = (MountInfo) WicketObjects.newInstance(mapInfoClassName);
        for (IRequestMapper mapper : mountInfo.getMountList()) {
            app.mount(mapper);
        }

        return true;
    } catch (Exception ex) {
        LOG.warn("Failed to automount pages.", ex);
        return false;
    }
}