Package org.codehaus.aspectwerkz

Examples of org.codehaus.aspectwerkz.UnbrokenObjectInputStream


    public static AnnotationInfo extractCustomAnnotation(final byte[] bytes) {

        try {

            Object userAnnotation = new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes)).readObject();

            if (userAnnotation instanceof AnnotationInfo) {

                return (AnnotationInfo)userAnnotation;
View Full Code Here


                if (attribute instanceof CustomAttribute) {
                    CustomAttribute customAttribute = (CustomAttribute) attribute;
                    byte[] bytes = customAttribute.getBytes();
                    try {
                        classAttributes
                                .add(new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes)).readObject());
                    } catch (Exception e) {
                        e.printStackTrace();
                        //TODO AVAOSD jp index offlined deployed make it breaks
                        // since Unkonw attr not wrapped in Attr
                        // SKIP throw new WrappedRuntimeException(e);
View Full Code Here

                    while (current != null) {
                        if (current instanceof CustomAttribute) {
                            CustomAttribute customAttribute = (CustomAttribute) current;
                            byte[] bytes = customAttribute.getBytes();
                            try {
                                methodAttributes.add(new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes))
                                        .readObject());
                            } catch (Exception e) {
                                throw new WrappedRuntimeException(e);
                            }
                        }
View Full Code Here

                    while (current != null) {
                        if (attribute instanceof CustomAttribute) {
                            CustomAttribute customAttribute = (CustomAttribute) attribute;
                            byte[] bytes = customAttribute.getBytes();
                            try {
                                methodAttributes.add(new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes))
                                        .readObject());
                            } catch (Exception e) {
                                throw new WrappedRuntimeException(e);
                            }
                        }
View Full Code Here

                    while (current != null) {
                        if (attribute instanceof CustomAttribute) {
                            CustomAttribute customAttribute = (CustomAttribute) attribute;
                            byte[] bytes = customAttribute.getBytes();
                            try {
                                fieldAttributes.add(new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes))
                                        .readObject());
                            } catch (Exception e) {
                                throw new WrappedRuntimeException(e);
                            }
                        }
View Full Code Here

     */
    private void retrieveCustomAttributes(final AttributeInfo attributeInfo, final List listToPutAttributesIn) {
        if (attributeInfo.getName().startsWith(AttributeEnhancer.CUSTOM_ATTRIBUTE)) {
            byte[] serializedAttribute = attributeInfo.get();
            try {
                Object attribute = new UnbrokenObjectInputStream(new ByteArrayInputStream(
                    serializedAttribute)).readObject();
                listToPutAttributesIn.add(attribute);
            } catch (Exception e) {
                System.out.println("WARNING: could not retrieve annotation due to: " + e.toString());
                // ignore
View Full Code Here

     * @param bytes
     * @return
     */
    public static AnnotationInfo extractCustomAnnotation(final byte[] bytes) {
        try {
            Object userAnnotation = new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes)).readObject();
            if (userAnnotation instanceof AnnotationInfo) {
                return (AnnotationInfo)userAnnotation;
            } else {
                // should not occur
                throw new RuntimeException("Custom annotation is not wrapped in AnnotationInfo: " + userAnnotation.getClass().getName());
View Full Code Here

     * @param bytes
     * @return
     */
    public static AnnotationInfo extractCustomAnnotation(final byte[] bytes) {
        try {
            Object userAnnotation = new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes)).readObject();
            if (userAnnotation instanceof AnnotationInfo) {
                return (AnnotationInfo)userAnnotation;
            } else {
                // should not occur
                throw new RuntimeException("Custom annotation is not wrapped in AnnotationInfo: "
View Full Code Here

     * @param bytes
     * @return
     */
    public static AnnotationInfo extractCustomAnnotation(final byte[] bytes) {
        try {
            Object userAnnotation = new UnbrokenObjectInputStream(new ByteArrayInputStream(bytes)).readObject();
            if (userAnnotation instanceof AnnotationInfo) {
                return (AnnotationInfo) userAnnotation;
            } else {
                // should not occur
                throw new RuntimeException(
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.UnbrokenObjectInputStream

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.