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

org.eclipse.persistence.jaxb.javamodel.oxm.OXMJavaPackageImpl Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
/*******************************************************************************
 * Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
 * which accompanies this distribution.
 * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 * and the Eclipse Distribution License is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * Contributors:
 *     Rick Barkhouse - 2.2 - Initial implementation
 ******************************************************************************/
package org.eclipse.persistence.jaxb.javamodel.oxm;

import java.util.Collection;

import org.eclipse.persistence.jaxb.javamodel.JavaAnnotation;
import org.eclipse.persistence.jaxb.javamodel.JavaClass;
import org.eclipse.persistence.jaxb.javamodel.JavaPackage;

/**
 * INTERNAL:
 * 

* Purpose: JavaPackage implementation used when bootstrapping * a DynamicJAXBContext from XML Bindings. *

* *

* Responsibilities: *

*
    *
  • Provide Package information to the JavaModel.
  • *
* * @since EclipseLink 2.2 * * @see org.eclipse.persistence.jaxb.javamodel.JavaPackage */ public class OXMJavaPackageImpl implements JavaPackage { protected String packageName; /** * Construct a new instance of OXMJavaPackageImpl. * * @param aPackage - the name of this JavaPackage. */ public OXMJavaPackageImpl(String aPackage) { this.packageName = aPackage; } /** * If this JavaPackage is annotated with an Annotation matching aClass, * return its JavaAnnotation representation. * * @param aClass a JavaClass representing the Annotation to look for. * * @return always returns null as JavaTypes do not have Annotations. */ public JavaAnnotation getAnnotation(JavaClass aClass) { return null; } /** * Return all of the Annotations for this JavaPackage. * * @return always returns null as JavaTypes do not have Annotations. */ public Collection getAnnotations() { return null; } /** * Returns the name of this JavaPackage. * * @return the String name of this JavaPackage. */ public String getName() { return this.packageName; } /** * Returns the fully-qualified name of this JavaPackage. * * @return the String name of this JavaPackage. */ public String getQualifiedName() { return getName(); } /** * Not supported. */ public JavaAnnotation getDeclaredAnnotation(JavaClass arg0) { throw new UnsupportedOperationException("getDeclaredAnnotation"); } /** * Not supported. */ public Collection getDeclaredAnnotations() { throw new UnsupportedOperationException("getDeclaredAnnotations"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy