Examples of Introspector


Examples of com.mycila.testing.core.introspect.Introspector

                return null;
            }
        };
        mockery.checking(new Expectations() {{
            allowing(ctx).introspector();
            will(returnValue(new Introspector(test)));
        }});
        assertNull(test.get());
        plugin.prepareTestInstance(ctx);
    }
View Full Code Here

Examples of com.mycila.testing.core.introspect.Introspector

                return "a string";
            }
        };
        mockery.checking(new Expectations() {{
            allowing(ctx).introspector();
            will(returnValue(new Introspector(test)));
        }});
        assertNull(test.get());
        plugin.prepareTestInstance(ctx);
    }
View Full Code Here

Examples of com.mycila.testing.core.introspect.Introspector

                return JMock2TestPluginTest.this.mockery3;
            }
        };
        mockery.checking(new Expectations() {{
            allowing(ctx).introspector();
            will(returnValue(new Introspector(test)));
            one(ctx).attributes().set(with(JMock2TestPlugin.MOCKERY), with(any(Mockery.class)));
        }});
        assertNull(test.get());
        plugin.prepareTestInstance(ctx);
        assertNotNull(test.get());
View Full Code Here

Examples of com.mycila.testing.core.introspect.Introspector

     * @param testInstance The object having configure methods
     * @return this
     */
    public MycilaTesting configure(Object testInstance) {
        notNull("Test instance", testInstance);
        final Introspector introspector = new Introspector(testInstance);
        final List<Method> methods = introspector.selectMethods(excludeOverridenMethods(and(methodsAnnotatedBy(ConfigureMycilaPlugins.class), new Filter<Method>() {
            @Override
            protected boolean accept(Method method) {
                final Class<?>[] types = method.getParameterTypes();
                return types.length == 1 && types[0].equals(PluginManager.class);
            }
View Full Code Here

Examples of com.mycila.testing.core.introspect.Introspector

    private final Attributes attributes = new AttributesImpl();

    TestContextImpl(PluginManager<TestPlugin> pluginManager, Object testInstance) {
        notNull("Plugin manager", pluginManager);
        notNull("Test instance", testInstance);
        this.introspector = new Introspector(testInstance);
        this.pluginManager = pluginManager;
        LOGGER.debug("Creating new Test Context for test %s#%s", this.introspector.testClass().getName(), this.introspector.instance().hashCode());
        Mycila.registerContext(this);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.jmx.Introspector

    public Object invoke(String methodName, Object[] methodParams,
        String[] methodSignature) throws MBeanException, ReflectionException {
    /* New for 8.0 */
        final Class implClass = getImplementingClass();
        final Object mbeanReference = getImplementingMBean();
        final Introspector    reflector       = new Introspector(implClass);
        Object value = null;
        try {

            final Method method = reflector.getMethod(methodName, methodSignature);
            value = reflector.invokeMethodOn(method, mbeanReference, methodParams);
            return ( value );
        }
        catch (java.lang.ClassNotFoundException cnfe) {
            throw new javax.management.ReflectionException(cnfe);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.jmx.Introspector

  private void createOperations()
  {
    Collection excludeList  = new Vector();
    excludeList.add("java.lang.Object");
    excludeList.add("com.sun.enterprise.admin.server.core.mbean.config.AdminBase");
    Introspector reflector = new Introspector(mClass);
    Method[] methods = reflector.getCallableInstanceMethods(excludeList);
    Vector oprVector = new Vector();
    for (int i = 0 ; i < methods.length ; i++)
    {
      String name    = methods[i].getName();
      boolean isGetter = name.startsWith(kGetterPrefix);
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.jmx.Introspector

    Inheritence is not supported in here.
  */
  private void createAttributes() throws IntrospectionException
  {
    Vector attrVector    = new Vector();
    Method[] declMethods  = new Introspector(mClass).getDeclaredConcretePublicMethods();
    Method[] getters    = this.getGetters(declMethods);
    Method[] setters    = this.getSetters(declMethods);
   
    for (int i = 0 ; i < getters.length ; i ++)
    {
View Full Code Here

Examples of io.hawt.introspect.Introspector

            this.bundleContext = bundleContext;
            this.schemaPath = Maps.stringValue(configuration, PROPERTY_SCHEMA_PATH, "schemas");
            getDataStore().trackConfiguration(changeRunnable);

            if (introspector == null) {
                localIntrospector = new Introspector();
                localIntrospector.init();
                introspector = localIntrospector;
            }
            asyncRecompile();
        } catch (Exception e) {
View Full Code Here

Examples of org.andromda.core.common.Introspector

                {
                    getLogger().debug(
                        "evaluating " + propertyGroups.size() + " property groups(s) on metafacade '" + metafacade +
                        "'");
                }
                final Introspector introspector = Introspector.instance();
                for (final Iterator tterator = propertyGroups.iterator(); tterator.hasNext();)
                {
                    final MetafacadeMapping.PropertyGroup propertyGroup =
                        (MetafacadeMapping.PropertyGroup)tterator.next();
                    for (final Iterator propertyIterator = propertyGroup.getProperties().iterator();
                        propertyIterator.hasNext();)
                    {
                        final MetafacadeMapping.Property property = (MetafacadeMapping.Property)propertyIterator.next();
                        valid = introspector.containsValidProperty(
                                metafacade,
                                property.getName(),
                                property.getValue());
                        if (getLogger().isDebugEnabled())
                        {
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.