Examples of newInstance()


Examples of org.jboss.xb.binding.Immutable.newInstance()

         }

         public Object endElement(Object o, QName name, ElementBinding element)
         {
            Immutable imm = (Immutable)o;
            return imm.newInstance();
         }
      }
      );
      attributeType.setSimpleType(new CharactersHandler(){
         public void setValue(QName qName, ElementBinding element, Object owner, Object value)
View Full Code Here

Examples of org.jdom.xpath.XPath.newInstance()

        // parse the metadata file
        XPath xPath = XPath.newInstance( "//metadata/versioning" );
        Element rootElement = document.getRootElement();

        Element versioning = (Element) xPath.selectSingleNode( rootElement );
        Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning );
        assertEquals( "2.3-SNAPSHOT", el.getValue() );

        el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning );
        assertTrue( el.getValue().equals( "20070315032817" ) );
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance()

        final CpsStepContext context = new CpsStepContext(d,thread,handle,an,ps.body);
        Step s;
        boolean sync;
        try {
            d.checkContextAvailability(context);
            s = d.newInstance(ps.namedArgs);
            StepExecution e = s.start(context);
            thread.setStep(e);
            sync = e.start();
        } catch (Exception e) {
            if (e instanceof MissingContextVariableException)
View Full Code Here

Examples of org.jnode.vm.facade.VmHeapManager.newInstance()

     */
    public static Object newInstance(VmMethod constructor, Object[] args)
        throws InstantiationException, IllegalAccessException,
        InvocationTargetException {
        final VmHeapManager hm = VmUtils.getVm().getHeapManager();
        final Object obj = hm.newInstance(constructor.getDeclaringClass());
        invoke(constructor, obj, args);
        return obj;
    }

    /**
 
View Full Code Here

Examples of org.jplastic.core.InstructionBuilder.newInstance()

            if (advisedMethodNode.localVariables != null)
                advisedMethodNode.localVariables.clear();

            InstructionBuilder builder = newBuilder(description, advisedMethodNode);

            builder.newInstance(invocationClassName).dupe(0);

            // Now load up the parameters to the constructor

            builder.loadThis();
            builder.loadThis().getField(className, getInstanceContextFieldName(), constructorTypes[1]);
View Full Code Here

Examples of org.jpos.q2.QFactory.newInstance()

            dirPoll.setPriorities (priorities);
        dirPoll.setLogger (getLog().getLogger(), getLog().getRealm ());
        Configuration cfg = factory.getConfiguration (getPersist());
        dirPoll.setConfiguration (cfg);
        dirPoll.createDirs ();
        Object dpp = factory.newInstance (getProcessor());
        if (dpp instanceof LogSource) {
            ((LogSource) dpp).setLogger (
                getLog().getLogger(), getLog().getRealm ()
            );
        }
View Full Code Here

Examples of org.jruby.RubyClass.newInstance()

        IRubyObject arg = (message != null) ? runtime.newString(message) : runtime.getNil();

        RubyClass instance = runtime.getErrno(n);
        if(instance == null) {
            instance = runtime.getSystemCallError();
            throw new RaiseException((RubyException)(instance.newInstance(runtime.getCurrentContext(), new IRubyObject[]{arg, runtime.newFixnum(n)}, Block.NULL_BLOCK)));
        } else {
            throw new RaiseException((RubyException)(instance.newInstance(runtime.getCurrentContext(), new IRubyObject[]{arg}, Block.NULL_BLOCK)));
        }
    }
View Full Code Here

Examples of org.jruby.javasupport.proxy.JavaProxyConstructor.newInstance()

                Object[] newArgs = new Object[args.length];
                Class[] parameterTypes = matching.getParameterTypes();
                for (int i = 0; i < args.length; i++) {
                    newArgs[i] = JavaUtil.convertArgumentToType(context, args[i], parameterTypes[i]);
                }
                JavaObject newObject = matching.newInstance(self, newArgs);
                return JavaUtilities.set_java_object(self, self, newObject);
            }
        });

        return runtime.getNil();
View Full Code Here

Examples of org.json.JSONObject.newInstance()

    Object[] args = new Object[] { criterias };
    Class<?>[] argsClass = new Class[] { List.class };

    Constructor<?> c = type.getAssociatedClass().getConstructor(argsClass);
    ComposedCriteria crit = (ComposedCriteria) c.newInstance(args);
    crit.addDecorator(decorator);
    crit.decorate();
    return crit;
  }
View Full Code Here

Examples of org.kie.api.definition.type.FactType.newInstance()

        KieBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

        KnowledgeBase kbase = loadKnowledgeBase( "kb1", drl, conf );
        FactType ft = kbase.getFactType( "org.drools.test", "Annot" );
        try {
            Object o = ft.newInstance();
            Annot a = o.getClass().getDeclaredField( "id" ).getAnnotation( Annot.class );
            assertEquals( 3, a.intProp() );
            assertEquals( String.class, a.typeProp() );
            assertEquals( 0, a.typeArrProp().length );
        } catch ( Exception e ) {
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.