All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sklsft.commons.mapper.beans.AccessibleField Maven / Gradle / Ivy

There is a newer version: 5.0.0-M1
Show newest version
package org.sklsft.commons.mapper.beans;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class AccessibleField {

	public Field field;
	public Method getter;
	public Method setter;
	
	public AccessibleField(Field field,Method getter, Method setter) {
		this.field = field;
		this.getter = getter;
		this.setter = setter;
	}

	public boolean isCompatibleWith(AccessibleField field2) {
		
		if (field.getType().getTypeParameters().length > 0) {
			return false;
		}
		
		if (field2.field.getType().getTypeParameters().length > 0) {
			return false;
		}
		
		if (!field2.field.getType().equals(field.getType())) {
			return false;
		}
		
		return true;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy