Examples of define()


Examples of org.eclipse.persistence.sdo.helper.SDOXSDHelper.define()

    public static void registerSDOContext(HelperContext context, List<Source> schemas) {
        SDOXSDHelper xsdHelper = (SDOXSDHelper) context.getXSDHelper();
        SDODatabindingSchemaResolver schemaResolver = new SDODatabindingSchemaResolver(schemas);
        for (Source source : schemas) {
            //SDOUtils.printDOM(source);
            xsdHelper.define(source, schemaResolver);
        }
    }


    public static List<Source> getSchemaClosureFromWSDL(Source wsdlSource) {
View Full Code Here

Examples of org.jboss.classfilewriter.ClassFile.define()

        try {
            theClass = cl.loadClass(stubClassName);
        } catch (ClassNotFoundException e) {
            try {
                final ClassFile clazz = IIOPStubCompiler.compile(myClass, stubClassName);
                theClass = clazz.define(cl);
            } catch (RuntimeException ex) {
                //there is a possibility that another thread may have defined the same class in the meantime
                try {
                    theClass = cl.loadClass(stubClassName);
                } catch (ClassNotFoundException e1) {
View Full Code Here

Examples of org.jruby.internal.runtime.GlobalVariables.define()

        initARGV(runtime);

        IAccessor d = new ValueAccessor(runtime.newString(
                runtime.getInstanceConfig().displayedFileName()));
        globals.define("$PROGRAM_NAME", d);
        globals.define("$0", d);

        // Version information:
        IRubyObject version = null;
        IRubyObject patchlevel = null;
View Full Code Here

Examples of org.librebiz.pureport.context.ReportContext.define()

                                random.nextDouble(), random.nextDouble(),
                                random.nextInt(10)));
                    }
                    Report report = ReportReader.load(Test4.class.getResource("test4.xml"));
                    ReportContext context = new ReportContext();
                    context.define("items", items);
                    PdfGenerator.generatePdf(context, report, new File("out4.pdf"));
                    PageStore pageStore = new PageStore();
                    FontRenderContext frc = new FontRenderContext(null, true, true);
                    Formatter fmt = new Formatter(report, context, frc, pageStore);
                    long tm = System.currentTimeMillis();
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

    Class<? extends Moose> c = ca.define(cd, Moose.class);
    Moose m = c.newInstance();
    m.doSomething(BEH.run);
    assertEquals("[2, 2, 0, 0]", Json.toJson(cc));

    Class<? extends Moose> c2 = ca2.define(cd, Moose.class);
    assertEquals(c, c2);
    m = c.newInstance();
    m.doSomething(BEH.run);
    assertEquals("[4, 4, 0, 0]", Json.toJson(cc));
  }
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

  public void test_return_array_method() {
    int[] cc = new int[4];
    Arrays.fill(cc, 0);
    ClassAgent aca = getNewClassAgent();
    aca.addInterceptor(MethodMatcherFactory.matcher("returnArrayMethod"), new MethodCounter(cc));
    Class<? extends Buffalo> c = aca.define(Nutzs.cd(), Buffalo.class);// RA.class;
    Buffalo r = Mirror.me(c).born();
    String[] ss = r.returnArrayMethod();
    assertEquals("[1, 1, 0, 0]", Json.toJson(cc));
    assertEquals(3, ss.length);
  }
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

    Arrays.fill(crun, 0);
    ClassAgent aca = getNewClassAgent();
    aca.addInterceptor(MethodMatcherFactory.matcher("run"), new MethodCounter(crun));
    aca.addInterceptor(MethodMatcherFactory.matcher(".*"), new MethodCounter(cc));
    aca.addInterceptor(MethodMatcherFactory.matcher("doSomething"), new RhinocerosListener());
    Class<? extends Rhinoceros> c = aca.define(Nutzs.cd(), Rhinoceros.class);// RA.class;
    Rhinoceros r = Mirror.me(c).born();
    r.doSomething(BEH.run);
    r.doSomething(BEH.fight);
    try {
      r.doSomething(BEH.lecture);
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

    Arrays.fill(cpub, 0);
    Arrays.fill(cpro, 0);
    ClassAgent aca = getNewClassAgent();
    aca.addInterceptor(MethodMatcherFactory.matcher(PUBLIC), new MethodCounter(cpub));
    aca.addInterceptor(MethodMatcherFactory.matcher(PROTECTED), new MethodCounter(cpro));
    Class<? extends Hippo> c = aca.define(Nutzs.cd(), Hippo.class);// RA.class;
    Hippo r = Mirror.me(c).born();
    Vegetarians.run(r, 78);
    r.doSomething(BEH.run);
    try {
      r.doSomething(BEH.lecture);
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

  public static void main(String[] args) throws Throwable {

    ClassAgent agent = new AsmClassAgent();
    agent.addInterceptor(MethodMatcherFactory.matcher(".*"), new MyMethodInterceptor());
    Class<Aop1> classZ = agent.define(Nutzs.cd(), Aop1.class);
    System.out.println(classZ);
    Field[] fields = classZ.getDeclaredFields();
    for (Field field : fields) {
      System.out.println("找到一个Field: " + field);
    }
View Full Code Here

Examples of org.nutz.aop.ClassAgent.define()

      return Mirror.me(type);
    ClassAgent agent = new AsmClassAgent();
    for (InterceptorPair interceptorPair : interceptorPairs)
      agent.addInterceptorinterceptorPair.getMethodMatcher(),
                  interceptorPair.getMethodInterceptor());
    return Mirror.me(agent.define(cd, type));
  }

  public void setAopConfigration(AopConfigration aopConfigration) {
    this.aopConfigration = aopConfigration;
  }
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.