Java Code Examples for net.bytebuddy.description.field.FieldDescription#getName()

The following examples show how to use net.bytebuddy.description.field.FieldDescription#getName() . 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: BiDirectionalAssociationHandler.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
private static String getMappedByManyToMany(FieldDescription target, TypeDescription targetEntity, ByteBuddyEnhancementContext context) {
	for ( FieldDescription f : targetEntity.getDeclaredFields() ) {
		if ( context.isPersistentField( f )
				&& target.getName().equals( getMappedByNotManyToMany( f ) )
				&& target.getDeclaringType().asErasure().isAssignableTo( entityType( f.getType() ) ) ) {
			log.debugf(
					"mappedBy association for field [%s#%s] is [%s#%s]",
					target.getDeclaringType().asErasure().getName(),
					target.getName(),
					targetEntity.getName(),
					f.getName()
			);
			return f.getName();
		}
	}
	return null;
}
 
Example 2
Source File: Implementation.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new field getter.
 *
 * @param instrumentedType The instrumented type.
 * @param fieldDescription The field for which a getter is described.
 * @param suffix           The name suffix for the field getter method.
 */
protected FieldGetter(TypeDescription instrumentedType, FieldDescription fieldDescription, String suffix) {
    this.instrumentedType = instrumentedType;
    this.fieldDescription = fieldDescription;
    name = fieldDescription.getName() + "$" + ACCESSOR_METHOD_SUFFIX + "$" + suffix;
}
 
Example 3
Source File: Implementation.java    From byte-buddy with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new field setter.
 *
 * @param instrumentedType The instrumented type.
 * @param fieldDescription The field for which a setter is described.
 * @param suffix           The name suffix for the field setter method.
 */
protected FieldSetter(TypeDescription instrumentedType, FieldDescription fieldDescription, String suffix) {
    this.instrumentedType = instrumentedType;
    this.fieldDescription = fieldDescription;
    name = fieldDescription.getName() + "$" + ACCESSOR_METHOD_SUFFIX + "$" + suffix;
}