Package org.codehaus.metaclass.model

Examples of org.codehaus.metaclass.model.Attribute


        throws Exception
    {
        final DNAAttributeInterceptor interceptor = new DNAAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "qualifier", "x" );
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        final String key = interceptor.determineKey( attribute, "com.biz.Foo" );
        assertEquals( "key", "com.biz.Foo/x", key );
    }
View Full Code Here


        throws Exception
    {
        final DNAAttributeInterceptor interceptor = new DNAAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "key", "x" );
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        final String key = interceptor.determineKey( attribute, "com.biz.Foo" );
        assertEquals( "key", "x", key );
    }
View Full Code Here

    {
        final Properties parameters = new Properties();
        parameters.setProperty( "type", ActionListener.class.getName() );
        final Attribute[] attributes = new Attribute[]
        {
            new Attribute( "dna.component" ),
            new Attribute( "dna.service", parameters )
        };
        final ClassDescriptor descriptor =
            new ClassDescriptor( BasicComponent.class.getName(),
                                 attributes,
                                 attributes,
View Full Code Here

        final Properties parameters = new Properties();
        parameters.setProperty( "optional", "false" );
        parameters.setProperty( "type", ActionListener.class.getName() );
        parameters.setProperty( "key", ActionListener.class.getName() );
        verifier.verifyDependencyMetaData( LifecycleExtendingService.class,
                                           new Attribute( "dna.dependency", parameters ),
                                           issues );
        assertNoIssues( issues );
    }
View Full Code Here

        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        final Properties parameters = new Properties();
        parameters.setProperty( "optional", "false" );
        verifier.verifyDependencyMetaData( LifecycleExtendingService.class,
                                           new Attribute( "dna.dependency", parameters ),
                                           issues );
        assertSingleIssue( issues,
                           "The dna.dependency attribute does not specify the parameter type.",
                           true, false );
    }
View Full Code Here

        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        final Properties parameters = new Properties();
        parameters.setProperty( "optional", "false" );
        parameters.setProperty( "type", ActionListener.class.getName() );
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        verifier.verifyDependencyMetaData( LifecycleExtendingService.class,
                                           attribute,
                                           issues );
        assertSingleIssue( issues,
                           "The dna.dependency attribute does not specify the parameter key.",
View Full Code Here

        final Properties parameters = new Properties();
        parameters.setProperty( "location", "BasicComponent-schema.xml" );
        final Attribute[] attributes = new Attribute[]
        {
            new Attribute( "dna.configuration", parameters )
        };
        final ParameterDescriptor param =
            new ParameterDescriptor( "X", Configuration.class.getName() );
        final ParameterDescriptor[] params = new ParameterDescriptor[]{param};
        final MethodDescriptor method =
View Full Code Here

        final List issues = new ArrayList();

        final Properties parameters = new Properties();
        final Attribute[] attributes = new Attribute[]
        {
            new Attribute( "dna.configuration", parameters )
        };
        final ParameterDescriptor param =
            new ParameterDescriptor( "X", Configuration.class.getName() );
        final ParameterDescriptor[] params = new ParameterDescriptor[]{param};
        final MethodDescriptor method =
View Full Code Here

                                               final MetaClassAccessor accessor )
        throws MetaClassException
    {
        final Attribute[] attributes = new Attribute[]
        {
            new Attribute( "dna.component" ),
        };
        return new ClassDescriptor( classname,
                                    attributes,
                                    attributes,
                                    FieldDescriptor.EMPTY_SET,
View Full Code Here

                    " must specify the parameter 'type'";
                throw new IllegalArgumentException( message );
            }
            final String resolvedType = resolveType( clazz, type );
            parameters.setProperty( "type", resolvedType );
            return new Attribute( "dna.service", parameters );
        }
        else
        {
            return attribute;
        }
View Full Code Here

TOP

Related Classes of org.codehaus.metaclass.model.Attribute

Copyright © 2018 www.massapicom. 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.