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

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


     * public void _persistence_setPropertyChangeListener(PropertyChangeListener propertychangelistener){
     *     _persistence_listener = propertychangelistener;
     * }
     */
    public void addSetPropertyChangeListener(ClassDetails classDetails){
        RuntimeVisibleAnnotations annotations = null;
        CodeVisitor cv_setPCL =  cv.visitMethod(ACC_PUBLIC, "_persistence_setPropertyChangeListener", "(" + PCL_SIGNATURE + ")V", null, annotations);
        cv_setPCL.visitVarInsn(ALOAD, 0);
        cv_setPCL.visitVarInsn(ALOAD, 1);
        cv_setPCL.visitFieldInsn(PUTFIELD, classDetails.getClassName(), "_persistence_listener", PCL_SIGNATURE);
        cv_setPCL.visitInsn(RETURN);
View Full Code Here


     private FetchGroup _persistence_fetchGroup;
     *  private boolean _persistence_shouldRefreshFetchGroup;
     *  private Session _persistence_session;
     */
    public void addFetchGroupVariables() {
        RuntimeVisibleAnnotations attrs = null;
       
        // Only add javax.persistence.Transient annotation if attribute access is being used
        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);
       
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"))));
View Full Code Here

        InputStream stream = null;
        try {
            String resourceString = className.replace('.', '/') + ".class";
            stream = m_loader.getResourceAsStream(resourceString);
            ClassReader reader = new ClassReader(stream);
            Attribute[] attributes = new Attribute[] { new RuntimeVisibleAnnotations(), new RuntimeVisibleParameterAnnotations(), new SignatureAttribute() };
            reader.accept(visitor, attributes, false);
        } catch (Exception exception) {
            // Some basic types can't be found, so can just be registered
            // (i.e. arrays). Also, VIRTUAL classes may also not exist,
            // therefore, tag the MetadataClass as loadable false. This will be
View Full Code Here

TOP

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

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.