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

org.eclipse.persistence.jaxb.javamodel.reflection.JavaConstructorImpl Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
/*******************************************************************************
* Copyright (c) 1998, 2013 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:
*     mmacivor - March 12/2009 - Initial implementation
******************************************************************************/

package org.eclipse.persistence.jaxb.javamodel.reflection;

import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;

import org.eclipse.persistence.jaxb.javamodel.JavaClass;
import org.eclipse.persistence.jaxb.javamodel.JavaConstructor;

/**
 * 

Purpose: JavaModel representation of a java.lang.reflect.Constructor object. *

Reponsibilities: *

  • Provide a reflection-based implementation of the JavaConstructor interface
  • *
  • Delegate calls to a wrapped instance of java.lang.reflect.Consturctor
  • *
* @author mmacivor * */ public class JavaConstructorImpl implements JavaConstructor { private JavaModelImpl javaModelImpl; protected Constructor jConstructor; public JavaConstructorImpl(Constructor constructor, JavaModelImpl javaModelImpl) { this.javaModelImpl = javaModelImpl; this.jConstructor = constructor; } public int getModifiers() { return jConstructor.getModifiers(); } public String getName() { return jConstructor.getName(); } public JavaClass getOwningClass() { return javaModelImpl.getClass(jConstructor.getDeclaringClass()); } public JavaClass[] getParameterTypes() { Class[] params = jConstructor.getParameterTypes(); JavaClass[] paramArray = new JavaClass[params.length]; for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy