Package jfun.yan

Examples of jfun.yan.Component.seal()


    }
  }
  public void testSealedComponent(){
    final Container yan = createYanContainer();
    final Component c1 = Components.ctor(java.util.ArrayList.class, new Class[]{int.class});
    yan.registerComponent("list", c1.seal());
    yan.registerValue(new Integer(10));
    try{
      yan.getInstance("list");
      fail ("should have failed with IrresolveableArgumentException");
    }
View Full Code Here


    try{
      yan.getInstance("list");
      fail ("should have failed with IrresolveableArgumentException");
    }
    catch(IrresolveableArgumentException e){}
    yan.registerComponent("list", c1.seal().withArgument(0, Components.value(5)));
    yan.getInstance("list");
    //fail ("should have failed with IrresolveableArgumentException");

    yan.registerComponent("list", c1);
    yan.registerComponent("target", Components.useKey("list").seal()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.