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

com.sun.xml.bind.v2.model.core.ElementInfo Maven / Gradle / Ivy

There is a newer version: 4.0.3
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.core;

import java.util.Collection;

import javax.xml.bind.JAXBElement;

/**
 * A particular use (specialization) of {@link JAXBElement}.
 *
 * TODO: is ElementInfo adaptable?
 *
 * @author Kohsuke Kawaguchi
 */
public interface ElementInfo extends Element {

    /**
     * Gets the object that represents the value property.
     *
     * @return
     *      non-null.
     */
    ElementPropertyInfo getProperty();

    /**
     * Short for getProperty().ref().get(0).
     *
     * The type of the value this element holds.
     *
     * Normally, this is the T of {@code JAXBElement}.
     * But if the property is adapted, this is the on-the-wire type.
     *
     * Or if the element has a list of values, then this field
     * represents the type of the individual item.
     *
     * @see #getContentInMemoryType()
     */
    NonElement getContentType();

    /**
     * T of {@code JAXBElement}.
     *
     * 

* This is tied to the in-memory representation. * * @see #getContentType() */ T getContentInMemoryType(); /** * Returns the representation for {@link JAXBElement}{@code }. * *

* This returns the signature in Java and thus isn't affected by the adapter. */ T getType(); /** * {@inheritDoc} * * {@link ElementInfo} can only substitute {@link ElementInfo}. */ ElementInfo getSubstitutionHead(); /** * All the {@link ElementInfo}s whose {@link #getSubstitutionHead()} points * to this object. * * @return * can be empty but never null. */ Collection> getSubstitutionMembers(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy