Class XJCJavaConstructorImpl

java.lang.Object
org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaConstructorImpl
All Implemented Interfaces:
JavaConstructor

public class XJCJavaConstructorImpl extends Object implements JavaConstructor
INTERNAL:

Purpose: JavaConstructor implementation wrapping XJC's JMethod. Used when bootstrapping a DynamicJAXBContext from an XML Schema.

Responsibilities:

  • Provide Constructor information from the underlying JMethod.
See Also:
  • Constructor Details

    • XJCJavaConstructorImpl

      public XJCJavaConstructorImpl(com.sun.codemodel.JMethod constructor, com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader, JavaClass owner)
      Construct a new instance of XJCJavaConstructorImpl.
      Parameters:
      constructor - - the XJC JMethod to be wrapped.
      codeModel - - the XJC JCodeModel this constructor belongs to.
      loader - - the ClassLoader used to bootstrap the DynamicJAXBContext.
      owner - - the JavaClass this constructor belongs to.
  • Method Details

    • getModifiers

      public int getModifiers()
      Returns the Java language modifiers for this JavaConstructor, encoded in an integer.
      Specified by:
      getModifiers in interface JavaConstructor
      Returns:
      the int representing the modifiers for this constructor.
      See Also:
    • getName

      public String getName()
      Returns the name of this JavaConstructor.
      Specified by:
      getName in interface JavaConstructor
      Returns:
      the String name of this JavaConstructor.
    • getParameterTypes

      public JavaClass[] getParameterTypes()
      Returns the array of parameters for this JavaConstructor.
      Specified by:
      getParameterTypes in interface JavaConstructor
      Returns:
      a JavaClass[] representing the argument types for this constructor.
    • isAbstract

      public boolean isAbstract()
      Indicates if this JavaConstructor is abstract.
      Specified by:
      isAbstract in interface JavaConstructor
      Returns:
      true if this JavaConstructor is abstract, otherwise false.
    • isPrivate

      public boolean isPrivate()
      Indicates if this JavaConstructor is private.
      Specified by:
      isPrivate in interface JavaConstructor
      Returns:
      true if this JavaConstructor is private, otherwise false.
    • isProtected

      public boolean isProtected()
      Indicates if this JavaConstructor is protected.
      Specified by:
      isProtected in interface JavaConstructor
      Returns:
      true if this JavaConstructor is protected, otherwise false.
    • isPublic

      public boolean isPublic()
      Indicates if this JavaConstructor is public.
      Specified by:
      isPublic in interface JavaConstructor
      Returns:
      true if this JavaConstructor is public, otherwise false.
    • isStatic

      public boolean isStatic()
      Indicates if this JavaConstructor is static.
      Specified by:
      isStatic in interface JavaConstructor
      Returns:
      true if this JavaConstructor is static, otherwise false.
    • isFinal

      public boolean isFinal()
      Indicates if this JavaConstructor is final.
      Specified by:
      isFinal in interface JavaConstructor
      Returns:
      true if this JavaConstructor is final, otherwise false.
    • isSynthetic

      public boolean isSynthetic()
      Not supported.
      Specified by:
      isSynthetic in interface JavaConstructor
    • getOwningClass

      public JavaClass getOwningClass()
      Returns the JavaClass which contains this constructor.
      Specified by:
      getOwningClass in interface JavaConstructor
      Returns:
      JavaClass representing the owner of this JavaConstructor.
    • setOwningClass

      public void setOwningClass(JavaClass owningClass)
      Set the JavaClass which contains this constructor.
      Parameters:
      owningClass - the JavaClass representing the owner of this JavaConstructor.