Package org.eclipse.persistence.internal.libraries.asm.attrs

Examples of org.eclipse.persistence.internal.libraries.asm.attrs.Annotation


        if (classDetails.usesAttributeAccess()){
            attrs = getTransientAnnotation();
        } else if (isJAXBOnPath()) {
            try {
                attrs = new RuntimeVisibleAnnotations();
                attrs.annotations.add(new Annotation(Type.getDescriptor(Class.forName("javax.xml.bind.annotation.XmlTransient"))));
            } catch (Exception exception) {}
        }
        cv.visitField(ACC_PROTECTED, EntityManagerImpl.PERSITENCE_FETCH_GROUP_WEAVED_FIELD_NAME, FETCHGROUP_SIGNATURE, null, attrs);
       
        cv.visitField(ACC_PROTECTED + ACC_TRANSIENT, "_persistence_shouldRefreshFetchGroup", PBOOLEAN_SIGNATURE, null, null);
View Full Code Here


     * Return the JPA transient annotation for weaving.
     */
    protected RuntimeVisibleAnnotations getTransientAnnotation(){
        RuntimeVisibleAnnotations attrs = new RuntimeVisibleAnnotations();
        //Annotation transientAnnotation = new Annotation("Ljavax/persistence/Transient;");
        Annotation transientAnnotation = new Annotation(Type.getDescriptor(javax.persistence.Transient.class));
        if (isJAXBOnPath()) {
            try {
                attrs.annotations.add(new Annotation(Type.getDescriptor(Class.forName("javax.xml.bind.annotation.XmlTransient"))));
            } catch (Exception exception) {}
        }
        attrs.annotations.add(transientAnnotation);
        return attrs;
    }
View Full Code Here

            }
        }

        private void addAnnotationsHelper(Map<String, MetadataAnnotation> annotations, RuntimeVisibleAnnotations visibleAnnotations) {
            for (Iterator iterator = visibleAnnotations.annotations.iterator();iterator.hasNext();) {
                Annotation visibleAnnotation = (Annotation) iterator.next();
                // Only add annotations that we care about.
                if ((visibleAnnotation.type.indexOf("javax/persistence") != -1) || (visibleAnnotation.type.indexOf("org/eclipse/persistence") != -1)) {
                    MetadataAnnotation annotation =buildAnnotation(visibleAnnotation);
                    annotations.put(annotation.getName(), annotation);
                }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.libraries.asm.attrs.Annotation

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.