Java Code Examples for net.bytebuddy.implementation.Implementation#Simple
The following examples show how to use
net.bytebuddy.implementation.Implementation#Simple .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersistentAttributeTransformer.java From lams with GNU General Public License v2.0 | 6 votes |
private Implementation fieldWriter(FieldDescription enhancedField) { Implementation implementation; if ( !enhancementContext.hasLazyLoadableAttributes( managedCtClass ) || !enhancementContext.isLazyLoadable( enhancedField ) ) { if ( enhancedField.getDeclaringType().asErasure().equals( managedCtClass ) ) { implementation = FieldAccessor.ofField( enhancedField.getName() ).in( enhancedField.getDeclaringType().asErasure() ); } else { implementation = new Implementation.Simple( new FieldMethodWriter( managedCtClass, enhancedField ) ); } } else { implementation = new Implementation.Simple( FieldWriterAppender.of( managedCtClass, enhancedField ) ); } implementation = InlineDirtyCheckingHandler.wrap( managedCtClass, enhancementContext, enhancedField, implementation ); return BiDirectionalAssociationHandler.wrap( managedCtClass, enhancementContext, enhancedField, implementation ); }
Example 2
Source File: PersistentAttributeTransformer.java From lams with GNU General Public License v2.0 | 5 votes |
private Implementation fieldReader(FieldDescription enhancedField) { if ( !enhancementContext.hasLazyLoadableAttributes( managedCtClass ) || !enhancementContext.isLazyLoadable( enhancedField ) ) { if ( enhancedField.getDeclaringType().asErasure().equals( managedCtClass ) ) { return FieldAccessor.ofField( enhancedField.getName() ).in( enhancedField.getDeclaringType().asErasure() ); } else { return new Implementation.Simple( new FieldMethodReader( managedCtClass, enhancedField ) ); } } else { return new Implementation.Simple( FieldReaderAppender.of( managedCtClass, enhancedField ) ); } }