Example usage for java.lang Module Module

List of usage examples for java.lang Module Module

Introduction

In this page you can find the example usage for java.lang Module Module.

Prototype

Module(ClassLoader loader) 

Source Link

Document

Create the unnamed Module for the given ClassLoader.

Usage

From source file:org.openmrs.module.ModuleUtilTest.java

/**
 * @see org.openmrs.module.ModuleUtil#getModuleForPath(String)
 *///from  ww w  .j a  va2s .c  o m
@Test
@Verifies(value = "should handle ui springmvc css ui dot css when ui dot springmvc module is running", method = "getModuleForPath(String)")
public void getModuleForPath_shouldHandleUiSpringmvcCssUiDotCssWhenUiDotSpringmvcModuleIsRunning()
        throws Exception {
    ModuleFactory.getStartedModulesMap().clear();
    Module module = new Module("For Unit Test");
    module.setModuleId("ui.springmvc");
    ModuleFactory.getStartedModulesMap().put(module.getModuleId(), module);

    String path = "/ui/springmvc/css/ui.css";
    Assert.assertEquals(module, ModuleUtil.getModuleForPath(path));
    ModuleFactory.getStartedModulesMap().clear();
}

From source file:org.openmrs.module.ModuleUtilTest.java

/**
 * @see org.openmrs.module.ModuleUtil#getModuleForPath(String)
 *///from   ww  w .ja  v a2 s .  c  o  m
@Test
@Verifies(value = "should handle ui springmvc css ui dot css when ui module is running", method = "getModuleForPath(String)")
public void getModuleForPath_shouldHandleUiSpringmvcCssUiDotCssWhenUiModuleIsRunning() throws Exception {
    ModuleFactory.getStartedModulesMap().clear();
    Module module = new Module("For Unit Test");
    module.setModuleId("ui");
    ModuleFactory.getStartedModulesMap().put(module.getModuleId(), module);

    String path = "/ui/springmvc/css/ui.css";
    Assert.assertEquals(module, ModuleUtil.getModuleForPath(path));
    ModuleFactory.getStartedModulesMap().clear();
}

From source file:org.op4j.functions.FnBigInteger.java

/**
  * <p>//from ww w  . java2 s  .  com
  * It performs a module operation and returns the value
  * of (input mod module) which is always positive 
  * (whereas remainder is not)
  * </p>
  * 
  * @param module the module
  * @return the result of (input mod module)
  */
public final static Function<BigInteger, BigInteger> module(byte module) {
    return new Module(fromNumber(Byte.valueOf(module)));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
 * <p>//from w w w . j  a v a  2 s. c om
 * It performs a module operation and returns the value
 * of (input mod module) which is always positive 
 * (whereas remainder is not)
 * </p>
 * 
 * @param module the module
 * @return the result of (input mod module)
 */
public final static Function<BigInteger, BigInteger> module(short module) {
    return new Module(fromNumber(Short.valueOf(module)));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
  * <p>// www  .  j av  a  2s  . c om
  * It performs a module operation and returns the value
  * of (input mod module) which is always positive 
  * (whereas remainder is not)
  * </p>
  * 
  * @param module the module
  * @return the result of (input mod module)
  */
public final static Function<BigInteger, BigInteger> module(int module) {
    return new Module(fromNumber(Integer.valueOf(module)));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
 * <p>//  ww  w. j a v a2 s .c om
 * It performs a module operation and returns the value
 * of (input mod module) which is always positive 
 * (whereas remainder is not)
 * </p>
 * 
 * @param module the module
 * @return the result of (input mod module)
 */
public final static Function<BigInteger, BigInteger> module(long module) {
    return new Module(fromNumber(Long.valueOf(module)));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
 * <p>/*www .j ava 2s. com*/
 * It performs a module operation and returns the value
 * of (input mod module) which is always positive 
 * (whereas remainder is not)
 * </p>
 * 
 * @param module the module
 * @return the result of (input mod module)
 */
public final static Function<BigInteger, BigInteger> module(Byte module) {
    return new Module(fromNumber(module));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
 * <p>//from  w w w .j ava 2  s . co m
 * It performs a module operation and returns the value
 * of (input mod module) which is always positive 
 * (whereas remainder is not)
 * </p>
 * 
 * @param module the module
 * @return the result of (input mod module)
 */
public final static Function<BigInteger, BigInteger> module(Short module) {
    return new Module(fromNumber(module));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
  * <p>/*from   w  ww.  j a  va  2 s. c  o m*/
  * It performs a module operation and returns the value
  * of (input mod module) which is always positive 
  * (whereas remainder is not)
  * </p>
  * 
  * @param module the module
  * @return the result of (input mod module)
  */
public final static Function<BigInteger, BigInteger> module(Integer module) {
    return new Module(fromNumber(module));
}

From source file:org.op4j.functions.FnBigInteger.java

/**
 * <p>/*from  w  ww  .ja v  a  2  s .co m*/
 * It performs a module operation and returns the value
 * of (input mod module) which is always positive 
 * (whereas remainder is not)
 * </p>
 * 
 * @param module the module
 * @return the result of (input mod module)
 */
public final static Function<BigInteger, BigInteger> module(Long module) {
    return new Module(fromNumber(module));
}