Package java.lang.annotation

Examples of java.lang.annotation.AnnotationFormatError


                    // Check for the enclosing instance parameter for
                    // non-static member classes
                    (declaringClass.isMemberClass() &&
                     ((declaringClass.getModifiers() & Modifier.STATIC) == 0&&
                     result.length + 1 != numParameters) ) {
                    throw new AnnotationFormatError(
                              "Parameter annotations don't match number of parameters");
                }
            }
        }
        return result;
View Full Code Here


            memberType, ByteBuffer.wrap(annotationDefault),
            sun.misc.SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
            getDeclaringClass());
        if (result instanceof sun.reflect.annotation.ExceptionProxy)
            throw new AnnotationFormatError("Invalid default: " + this);
        return result;
    }
View Full Code Here

                        "one handler instance can handle more than one pipeline " +
                        "(\"" + ALL + "\") or not (\"" + ONE + "\")");
            } else {
                String coverageValue = coverage.value();
                if (coverageValue == null) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value is undefined for type: " +
                            handler.getClass().getName());
                }


                if (!coverageValue.equals(ALL) && !coverageValue.equals(ONE)) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value: " + coverageValue +
                            " (must be either \"" + ALL + "\" or \"" + ONE + ")");
                }
            }
View Full Code Here

                        "one handler instance can handle more than one pipeline " +
                        "(\"" + ALL + "\") or not (\"" + ONE + "\")");
            } else {
                String coverageValue = coverage.value();
                if (coverageValue == null) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value is undefined for type: " +
                            handler.getClass().getName());
                }


                if (!coverageValue.equals(ALL) && !coverageValue.equals(ONE)) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value: " + coverageValue +
                            " (must be either \"" + ALL + "\" or \"" + ONE + ")");
                }
            }
View Full Code Here

                        "handler instance can handle more than one pipeline " +
                        "(\"" + ALL + "\") or not (\"" + ONE + "\")");
            } else {
                String coverageValue = coverage.value();
                if (coverageValue == null) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value is undefined for type: " +
                            handler.getClass().getName());
                }

                if (!coverageValue.equals(ALL) && !coverageValue.equals(ONE)) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value: " + coverageValue +
                            " (must be either \"" + ALL + "\" or \"" + ONE + ")");
                }
            }
View Full Code Here

    /**
     * @tests java.lang.annotation.AnnotationFormatError#AnnotationFormatError(String)
     */
    @SuppressWarnings("nls")
    public void test_constructorLjava_lang_String() {
        AnnotationFormatError e = new AnnotationFormatError("some message");
        assertEquals("some message", e.getMessage());
    }
View Full Code Here

    /**
     * @tests java.lang.annotation.AnnotationFormatError#AnnotationFormatError(Throwable)
     */
    public void test_constructorLjava_lang_Throwable() {
        IllegalArgumentException iae = new IllegalArgumentException();
        AnnotationFormatError e = new AnnotationFormatError(iae);
        assertSame(iae, e.getCause());
    }
View Full Code Here

     * @tests java.lang.annotation.AnnotationFormatError#AnnotationFormatError(String,Throwable)
     */
    @SuppressWarnings("nls")
    public void test_constructorLjava_lang_StringLjava_lang_Throwable() {
        IllegalArgumentException iae = new IllegalArgumentException();
        AnnotationFormatError e = new AnnotationFormatError("some message", iae);
        assertEquals("some message", e.getMessage());
        assertSame(iae, e.getCause());
    }
View Full Code Here

        final Object[] keyArgs;
        if (keyMask.length == 0) {
            keyArgs = args;
        }
        else if (keyMask.length != args.length) {
            throw new AnnotationFormatError("RequestCache.keyMask has an invalid length on: " + signature.toLongString());
        }
        else {
            keyArgs = new Object[args.length];
            for (int i = 0; i < args.length; i++) {
                if (keyMask[i]) {
View Full Code Here

                        "one handler instance can handle more than one pipeline " +
                        "(\"" + ALL + "\") or not (\"" + ONE + "\")");
            } else {
                String coverageValue = coverage.value();
                if (coverageValue == null) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value is undefined for type: " +
                            handler.getClass().getName());
                }


                if (!coverageValue.equals(ALL) && !coverageValue.equals(ONE)) {
                    throw new AnnotationFormatError(
                            ChannelPipelineCoverage.class.getSimpleName() +
                            " annotation value: " + coverageValue +
                            " (must be either \"" + ALL + "\" or \"" + ONE + ")");
                }
            }
View Full Code Here

TOP

Related Classes of java.lang.annotation.AnnotationFormatError

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.