congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
me.seeber.gradle.ide.eclipse.annotations
Code IndexAdd Tabnine to your IDE (free)

How to use me.seeber.gradle.ide.eclipse.annotations

Best Java code snippets using me.seeber.gradle.ide.eclipse.annotations (Showing top 20 results out of 315)

origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getReturnValueNullability(MethodDescription)
 */
@Override
public Nullness getReturnValueNullability(MethodDescription method) {
  Nullness nullability = Nullness.UNDEFINED;
  for (Nullability provider : this.nullabilities) {
    Nullness override = provider.getReturnValueNullability(method);
    nullability = nullability.override(override);
  }
  return nullability;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getParameterNullability(net.bytebuddy.description.method.ParameterDescription)
 */
@Override
public Nullness getParameterNullability(ParameterDescription parameter) {
  Nullness nullability = Nullness.UNDEFINED;
  for (Nullability provider : this.nullabilities) {
    Nullness override = provider.getParameterNullability(parameter);
    nullability = nullability.override(override);
  }
  return nullability;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Override this nullability with another one
 * 
 * @param override Override nullability
 * @return Nullability that overrides this with another nullability
 */
public default Nullability override(Nullability override) {
  return new CombinedNullability(this, override);
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Append an array type signature
 *
 * @param type Array type to append
 * @param nullable Nullness of type
 * @param output Output to append to
 * @param <A> Type of output
 * @return Supplied output to append to
 */
public <A extends Appendable> A appendArrayTypeSignature(Generic type, Nullness nullable, A output) {
  try {
    output.append('[').append(nullable.getMarker());
    appendJavaTypeSignature(Validate.notNull(type.getComponentType()), Nullness.UNDEFINED, output);
    return output;
  }
  catch (Exception e) {
    throw new RuntimeException(String.format("Could not write array type %s", type));
  }
}
origin: me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getReturnValueNullability(net.bytebuddy.description.method.MethodDescription)
 */
@Override
public Nullness getReturnValueNullability(MethodDescription method) {
  Nullness nullability = getNullability(method.getDeclaredAnnotations());
  return nullability;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Create a new AnnotationsJarBuilder
 *
 * @param jarFile JAR file to read
 * @param classLoader Class loader to resolve types
 */
public JarReader(File jarFile, ClassLoader classLoader) {
  this.classLoader = classLoader;
  try {
    openJarFile(jarFile);
  }
  catch (IOException e) {
    throw new RuntimeException("Cannot create annotations JAR builder", e);
  }
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Append type arguments
 *
 * @param buf Buffer to append to
 * @param typeArguments Type arguments
 * @return <code>true</code> if any nullability information was written
 * @throws IOException I'm sorry, this usually doesn't happen to me...
 */
protected boolean appendTypeArguments(StringBuilder buf, TypeList.Generic typeArguments) throws IOException {
  String plainTypeVariables = this.signatureWriter.appendTypeArguments(typeArguments, new StringBuilder())
      .toString();
  String annotatedTypeVariables = this.signatureWriter.appendTypeArguments(typeArguments, new StringBuilder())
      .toString();
  buf.append(plainTypeVariables).append("\n");
  buf.append(annotatedTypeVariables).append("\n");
  boolean annotated = plainTypeVariables.equals(annotatedTypeVariables);
  return annotated;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Append type parameters
 *
 * @param buf Buffer to append to
 * @param typeParameters Type parameters
 * @param annotatedSignatureWriter Signature writer
 * @return <code>true</code> if any nullability information was written
 * @throws IOException if we fail completely...
 */
protected boolean appendTypeParameters(StringBuilder buf, TypeList.Generic typeParameters,
    MethodSignatureWriter annotatedSignatureWriter) throws IOException {
  String plainTypeVariables = this.signatureWriter.appendTypeParameters(typeParameters, new StringBuilder())
      .toString();
  String annotatedTypeVariables = annotatedSignatureWriter
      .appendTypeParameters(typeParameters, new StringBuilder()).toString();
  buf.append(plainTypeVariables).append("\n");
  buf.append(annotatedTypeVariables).append("\n");
  boolean annotated = !plainTypeVariables.equals(annotatedTypeVariables);
  return annotated;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Get the target file for an input file
 *
 * @param jarFile Source JAR file
 * @return Target file
 */
protected File getTargetFile(File jarFile) {
  String baseName = Files.getNameWithoutExtension(jarFile.getName());
  File annotationJarFile = new File(getDestinationDir(), baseName + "-annotations.zip");
  return annotationJarFile;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Create a new task
 */
public EclipseAnnotationsTask() {
  this.jars = Collections.emptySet();
  this.destinationDir = new File(getProject().getBuildDir(), "annotations");
}
origin: me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getReturnValueNullability(MethodDescription)
 */
@Override
public Nullness getReturnValueNullability(MethodDescription method) {
  Nullness nullability = Nullness.UNDEFINED;
  for (Nullability provider : this.nullabilities) {
    Nullness override = provider.getReturnValueNullability(method);
    nullability = nullability.override(override);
  }
  return nullability;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getParameterNullability(net.bytebuddy.description.method.ParameterDescription)
 */
@Override
public Nullness getParameterNullability(ParameterDescription parameter) {
  Nullness nullability = Nullness.UNDEFINED;
  for (Nullability provider : this.nullabilities) {
    Nullness override = provider.getParameterNullability(parameter);
    nullability = nullability.override(override);
  }
  return nullability;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Append an array type signature
 *
 * @param type Array type to append
 * @param nullable Nullness of type
 * @param output Output to append to
 * @param <A> Type of output
 * @return Supplied output to append to
 */
public <A extends Appendable> A appendArrayTypeSignature(Generic type, Nullness nullable, A output) {
  try {
    output.append('[').append(nullable.getMarker());
    appendJavaTypeSignature(Validate.notNull(type.getComponentType()), Nullness.UNDEFINED, output);
    return output;
  }
  catch (Exception e) {
    throw new RuntimeException(String.format("Could not write array type %s", type));
  }
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Override this nullability with another one
 * 
 * @param override Override nullability
 * @return Nullability that overrides this with another nullability
 */
public default Nullability override(Nullability override) {
  return new CombinedNullability(this, override);
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * @see me.seeber.gradle.ide.eclipse.annotations.Nullability#getReturnValueNullability(net.bytebuddy.description.method.MethodDescription)
 */
@Override
public Nullness getReturnValueNullability(MethodDescription method) {
  Nullness nullability = getNullability(method.getDeclaredAnnotations());
  return nullability;
}
origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Create a new AnnotationsJarBuilder
 *
 * @param jarFile JAR file to read
 * @param classLoader Class loader to resolve types
 */
public JarReader(File jarFile, ClassLoader classLoader) {
  this.classLoader = classLoader;
  try {
    openJarFile(jarFile);
  }
  catch (IOException e) {
    throw new RuntimeException("Cannot create annotations JAR builder", e);
  }
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Append type arguments
 *
 * @param buf Buffer to append to
 * @param typeArguments Type arguments
 * @return <code>true</code> if any nullability information was written
 * @throws IOException I'm sorry, this usually doesn't happen to me...
 */
protected boolean appendTypeArguments(StringBuilder buf, TypeList.Generic typeArguments) throws IOException {
  String plainTypeVariables = this.signatureWriter.appendTypeArguments(typeArguments, new StringBuilder())
      .toString();
  String annotatedTypeVariables = this.signatureWriter.appendTypeArguments(typeArguments, new StringBuilder())
      .toString();
  buf.append(plainTypeVariables).append("\n");
  buf.append(annotatedTypeVariables).append("\n");
  boolean annotated = plainTypeVariables.equals(annotatedTypeVariables);
  return annotated;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Append type parameters
 *
 * @param buf Buffer to append to
 * @param typeParameters Type parameters
 * @param annotatedSignatureWriter Signature writer
 * @return <code>true</code> if any nullability information was written
 * @throws IOException if we fail completely...
 */
protected boolean appendTypeParameters(StringBuilder buf, TypeList.Generic typeParameters,
    MethodSignatureWriter annotatedSignatureWriter) throws IOException {
  String plainTypeVariables = this.signatureWriter.appendTypeParameters(typeParameters, new StringBuilder())
      .toString();
  String annotatedTypeVariables = annotatedSignatureWriter
      .appendTypeParameters(typeParameters, new StringBuilder()).toString();
  buf.append(plainTypeVariables).append("\n");
  buf.append(annotatedTypeVariables).append("\n");
  boolean annotated = !plainTypeVariables.equals(annotatedTypeVariables);
  return annotated;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Get the target file for an input file
 *
 * @param jarFile Source JAR file
 * @return Target file
 */
protected File getTargetFile(File jarFile) {
  String baseName = Files.getNameWithoutExtension(jarFile.getName());
  File annotationJarFile = new File(getDestinationDir(), baseName + "-annotations.zip");
  return annotationJarFile;
}
origin: me.seeber.gradle/gradle-project-config

/**
 * Create a new task
 */
public EclipseAnnotationsTask() {
  this.jars = Collections.emptySet();
  this.destinationDir = new File(getProject().getBuildDir(), "annotations");
}
me.seeber.gradle.ide.eclipse.annotations

Most used classes

  • AnnotationNullability
    Nullability specified by annotations
  • AnnotationsJarWriter
    Writer for Eclipse external annotations JARs
  • CombinedNullability
    Nullability that combines several nullabilities
  • EclipseAnnotationsTask
    Task to generate Eclipse external annotations from a JAR This task scans the supplied JARs for nulla
  • JarReader
    Scan a dependency for nullability annotations
  • MethodSignatureWriter,
  • Nullability
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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