congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JDefinedClass.getConstructor
Code IndexAdd Tabnine to your IDE (free)

How to use
getConstructor
method
in
com.sun.codemodel.JDefinedClass

Best Java code snippets using com.sun.codemodel.JDefinedClass.getConstructor (Showing top 5 results out of 315)

origin: sabomichal/immutable-xjc

private JMethod addStandardConstructor(final JDefinedClass clazz, FieldOutline[] declaredFields, FieldOutline[] superclassFields) {
  JMethod ctor = clazz.getConstructor(NO_ARGS);
  if (ctor == null) {
    ctor = this.generateStandardConstructor(clazz, declaredFields, superclassFields);
  } else {
    this.log(Level.WARNING, "standardCtorExists");
  }
  return ctor;
}
origin: net.sourceforge.ccxjc/cc-xjc-plugin

private JMethod getStandardConstructor( final ClassOutline clazz )
{
  JMethod ctor = clazz.implClass.getConstructor( NO_ARGS );
  if ( ctor == null )
  {
    ctor = this.generateStandardConstructor( clazz );
  }
  else
  {
    this.log( Level.WARNING, "standardCtorExists", clazz.implClass.binaryName() );
  }
  return ctor;
}
origin: sabomichal/immutable-xjc

private Object addPropertyContructor(JDefinedClass clazz, FieldOutline[] declaredFields, FieldOutline[] superclassFields, int constAccess) {
  JMethod ctor = clazz.getConstructor(getFieldTypes(declaredFields, superclassFields));
  if (ctor == null) {
    ctor = this.generatePropertyConstructor(clazz, declaredFields, superclassFields, constAccess);
  } else {
    this.log(Level.WARNING, "standardCtorExists");
  }
  return ctor;
}
origin: net.sourceforge.ccxjc/cc-xjc-plugin

private JMethod getCopyConstructor( final ClassOutline clazz )
{
  JMethod ctor = clazz.implClass.getConstructor( new JType[]
    {
      clazz.implClass
    } );
  if ( ctor == null )
  {
    ctor = this.generateCopyConstructor( clazz );
  }
  else
  {
    this.log( Level.WARNING, "copyCtorExists", clazz.implClass.binaryName() );
  }
  return ctor;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Return the <code>JavaConstructor</code> for this <code>JavaClass</code> that has the
 * provided parameter types.
 *
 * @param parameterTypes the parameter list used to identify the constructor.
 *
 * @return the <code>JavaConstructor</code> with the signature matching parameterTypes.
 */
public JavaConstructor getConstructor(JavaClass[] parameterTypes) {
  JType[] xjcParameterTypes = new JType[parameterTypes.length];
  for (int i = 0; i < parameterTypes.length; i++) {
    JavaClass pType = parameterTypes[i];
    String className = pType.getQualifiedName();
    JType xjcType = null;
    if (pType.isPrimitive()) {
      xjcType = jPrimitiveTypes.get(className);
    } else {
      xjcType = jCodeModel._getClass(className);
    }
    xjcParameterTypes[i] = xjcType;
  }
  JMethod constructor = xjcClass.getConstructor(xjcParameterTypes);
  return new XJCJavaConstructorImpl(constructor, jCodeModel, dynamicClassLoader, this);
}
com.sun.codemodelJDefinedClassgetConstructor

Javadoc

Looks for a method that has the specified method signature and return it.

Popular methods of JDefinedClass

  • method
  • _extends
  • field
  • _implements
  • name
    JClass name accessor. For example, for java.util.List, this method returns "List""
  • constructor
    Adds a constructor to this class.
  • fields
    Returns all the fields declred in this class. The returned Map is a read-only live view.
  • annotate
    Adding ability to annotate a class
  • fullName
    Gets the fully qualified name of this class.
  • methods
  • owner
  • javadoc
    Creates, if necessary, and returns the class javadoc for this JDefinedClass
  • owner,
  • javadoc,
  • _class,
  • getMethod,
  • _package,
  • dotclass,
  • enumConstant,
  • staticInvoke,
  • staticRef,
  • init

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • BoxLayout (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now