Package org.apache.wink.common.internal.registry

Examples of org.apache.wink.common.internal.registry.Injectable


        return collector.getMetadata();
    }

    @Override
    protected final Injectable parseAccessibleObject(AccessibleObject field, Type fieldType) {
        Injectable injectable =
            InjectableFactory.getInstance().create(fieldType,
                                                   field.getAnnotations(),
                                                   (Member)field,
                                                   getMetadata().isEncoded(),
                                                   null);
        if (injectable.getParamType() == Injectable.ParamType.ENTITY) {
            // EntityParam should be ignored for fields (see JSR-311 3.2)
            return null;
        }
        return injectable;
    }
View Full Code Here


    private void parseMethodParameters(Method method, MethodMetadata methodMetadata) {
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        Type[] paramTypes = method.getGenericParameterTypes();
        boolean entityParamExists = false;
        for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
            Injectable fp =
                InjectableFactory.getInstance().create(paramTypes[pos],
                                                       parameterAnnotations[pos],
                                                       method,
                                                       getMetadata().isEncoded() || methodMetadata
                                                           .isEncoded(),
                                                       methodMetadata.getDefaultValue());
            if (fp.getParamType() == Injectable.ParamType.ENTITY) {
                if (entityParamExists) {
                    // we are allowed to have only one entity parameter
                    String methodName =
                        method.getDeclaringClass().getName() + "." + method.getName();
                    throw new IllegalStateException("Resource method " + methodName
View Full Code Here

        private void createFormalParameters() {
            formalParameters = new LinkedList<Injectable>();
            Annotation[][] parameterAnnotations = method.getParameterAnnotations();
            Type[] paramTypes = method.getGenericParameterTypes();
            for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
                Injectable fp =
                    InjectableFactory.getInstance().create(paramTypes[pos],
                                                           parameterAnnotations[pos],
                                                           method,
                                                           false,
                                                           null);
View Full Code Here

        private void createFormalParameters() {
            formalParameters = new LinkedList<Injectable>();
            Annotation[][] parameterAnnotations = method.getParameterAnnotations();
            Type[] paramTypes = method.getGenericParameterTypes();
            for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
                Injectable fp =
                    InjectableFactory.getInstance().create(paramTypes[pos],
                                                           parameterAnnotations[pos],
                                                           method,
                                                           false,
                                                           null);
View Full Code Here

        private void createFormalParameters() {
            formalParameters = new LinkedList<Injectable>();
            Annotation[][] parameterAnnotations = method.getParameterAnnotations();
            Type[] paramTypes = method.getGenericParameterTypes();
            for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
                Injectable fp =
                    InjectableFactory.getInstance().create(paramTypes[pos],
                                                           parameterAnnotations[pos],
                                                           method,
                                                           false,
                                                           null);
View Full Code Here

        return collector.getMetadata();
    }

    @Override
    protected final Injectable parseAccessibleObject(AccessibleObject field, Type fieldType) {
        Injectable injectable =
            InjectableFactory.getInstance().create(fieldType,
                                                   field.getAnnotations(),
                                                   (Member)field,
                                                   getMetadata().isEncoded(),
                                                   null);
        if (injectable.getParamType() == Injectable.ParamType.ENTITY) {
            // EntityParam should be ignored for fields (see JSR-311 3.2)
            return null;
        }
        return injectable;
    }
View Full Code Here

    private void parseMethodParameters(Method method, MethodMetadata methodMetadata) {
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        Type[] paramTypes = method.getGenericParameterTypes();
        boolean entityParamExists = false;
        for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
            Injectable fp =
                InjectableFactory.getInstance().create(paramTypes[pos],
                                                       parameterAnnotations[pos],
                                                       method,
                                                       getMetadata().isEncoded() || methodMetadata
                                                           .isEncoded(),
                                                       methodMetadata.getDefaultValue());
            if (fp.getParamType() == Injectable.ParamType.ENTITY) {
                if (entityParamExists) {
                    // we are allowed to have only one entity parameter
                    String methodName =
                        method.getDeclaringClass().getName() + "." + method.getName();
                    throw new IllegalStateException("Resource method " + methodName
View Full Code Here

        private void createFormalParameters() {
            formalParameters = new LinkedList<Injectable>();
            Annotation[][] parameterAnnotations = method.getParameterAnnotations();
            Type[] paramTypes = method.getGenericParameterTypes();
            for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
                Injectable fp =
                    InjectableFactory.getInstance().create(paramTypes[pos],
                                                           parameterAnnotations[pos],
                                                           method,
                                                           false,
                                                           null);
View Full Code Here

        private void createFormalParameters() {
            formalParameters = new LinkedList<Injectable>();
            Annotation[][] parameterAnnotations = method.getParameterAnnotations();
            Type[] paramTypes = method.getGenericParameterTypes();
            for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
                Injectable fp =
                    InjectableFactory.getInstance().create(paramTypes[pos],
                                                           parameterAnnotations[pos],
                                                           method,
                                                           false,
                                                           null);
View Full Code Here

        return collector.getMetadata();
    }

    @Override
    protected final Injectable parseAccessibleObject(AccessibleObject field, Type fieldType) {
        Injectable injectable =
            InjectableFactory.getInstance().create(fieldType,
                                                   field.getAnnotations(),
                                                   (Member)field,
                                                   getMetadata().isEncoded(),
                                                   null);
        if (injectable.getParamType() == Injectable.ParamType.ENTITY) {
            // EntityParam should be ignored for fields (see JSR-311 3.2)
            return null;
        }
        return injectable;
    }
View Full Code Here

TOP

Related Classes of org.apache.wink.common.internal.registry.Injectable

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.