com.sun.xml.bind.AccessorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxb-runtime Show documentation
Show all versions of jaxb-runtime Show documentation
JAXB (JSR 222) Reference Implementation
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.xml.bind;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import javax.xml.bind.JAXBException;
import com.sun.xml.bind.v2.runtime.reflect.Accessor;
/**
* A means to allow the user to provide customized Accessor
* to be used by JAXB.
*/
public interface AccessorFactory {
/**
* Access a field of the class.
*
* @param bean the class to be processed.
* @param f the field within the class to be accessed.
* @param readOnly the isStatic value of the field's modifier.
* @return Accessor the accessor for this field
*
* @throws JAXBException reports failures of the method.
*/
Accessor createFieldAccessor(Class bean, Field f, boolean readOnly) throws JAXBException;
/**
* Access a property of the class.
*
* @param bean the class to be processed
* @param getter the getter method to be accessed. The value can be null.
* @param setter the setter method to be accessed. The value can be null.
* @return Accessor the accessor for these methods
*
* @throws JAXBException reports failures of the method.
*/
Accessor createPropertyAccessor(Class bean, Method getter, Method setter) throws JAXBException;
}