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

com.sun.xml.bind.v2.model.runtime.RuntimePropertyInfo Maven / Gradle / Ivy

There is a newer version: 4.0.4
Show newest version
/*
 * Copyright (c) 1997, 2018 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.v2.model.runtime;

import java.lang.reflect.Type;
import java.util.Collection;

import com.sun.xml.bind.v2.model.core.PropertyInfo;
import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
import com.sun.xml.bind.v2.runtime.reflect.Accessor;

/**
 * {@link PropertyInfo} that exposes more information.
 *
 * @author Kohsuke Kawaguchi ([email protected])
 */
public interface RuntimePropertyInfo extends PropertyInfo {

    /** {@inheritDoc} */
    Collection ref();


    /**
     * Gets the {@link Accessor} for this property.
     *
     * 

* Even for a multi-value property, this method returns an accessor * to that property. IOW, the accessor works against the raw type. * *

* This methods returns unoptimized accessor (because optimization * accessors are often combined into bigger pieces, and optimization * generally works better if you can look at a bigger piece, as opposed * to individually optimize a smaller components) * * @return * never null. * * @see Accessor#optimize(JAXBContextImpl) */ Accessor getAccessor(); /** * Returns true if this property has an element-only content. False otherwise. */ public boolean elementOnlyContent(); /** * Gets the "raw" type of the field. * * The raw type is the actual signature of the property. * For example, if the field is the primitive int, this will be the primitive int. * If the field is Object, this will be Object. * If the property is the collection and typed as {@code Collection}, * this method returns {@code Collection}. * * @return always non-null. */ Type getRawType(); /** * Gets the type of the individual item. * * The individual type is the signature of the property used to store individual * values. For a non-collection field, this is the same as {@link #getRawType()}. * For acollection property, this is the type used to store individual value. * So if {@link #getRawType()} is {@code Collection}, this method will * return {@link Integer}. * * @return always non-null. */ Type getIndividualType(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy