Package org.jplastic.core

Examples of org.jplastic.core.MethodDescription


    public PlasticMethod introduceMethod(Method method)
    {
        check();

        return introduceMethod(new MethodDescription(method).withModifiers(method.getModifiers() & ~Modifier.ABSTRACT));
    }
View Full Code Here


        Set<PlasticMethod> introducedMethods = new HashSet<PlasticMethod>();

        for (Method m : interfaceType.getMethods())
        {
            MethodDescription description = new MethodDescription(m);

            if (!isMethodImplemented(description))
            {
                introducedMethods.add(introduceMethod(m));
            }
View Full Code Here

            check();

            assert delegateProvidingMethod != null;

            // TODO: ensure same class, ensure not primitive/array type
            final MethodDescription providerDescriptor = delegateProvidingMethod.getDescription();
            final String delegateType = providerDescriptor.returnType;

            if (delegateType.equals("void") || providerDescriptor.argumentTypes.length > 0)
                throw new IllegalArgumentException(
                        String.format(
View Full Code Here

        for (int i = 0; i < exceptionClassNames.length; i++)
        {
            exceptionClassNames[i] = exceptions.get(i).replace('/', '.');
        }

        return new MethodDescription(node.access, returnType, node.name, arguments, exceptionClassNames);
    }
View Full Code Here

            String capitalized = PlasticInternalUtils.capitalize(propertyName);

            if (accessType != PropertyAccessType.WRITE_ONLY)
            {
                introduceMethod(new MethodDescription(getTypeName(), "get" + capitalized, null)).changeImplementation(
                        new InstructionBuilderCallback()
                        {
                            public void doBuild(InstructionBuilder builder)
                            {
                                builder.loadThis().getField(className, node.name, getTypeName()).returnResult();
                            }
                        });
            }

            if (accessType != PropertyAccessType.READ_ONLY)
            {
                introduceMethod(new MethodDescription("void", "set" + capitalized, getTypeName()))
                        .changeImplementation(new InstructionBuilderCallback()
                        {
                            public void doBuild(InstructionBuilder builder)
                            {
                                builder.loadThis().loadArgument(0);
View Full Code Here

TOP

Related Classes of org.jplastic.core.MethodDescription

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.