Tabnine Logo
MethodBinding.genericSignature
Code IndexAdd Tabnine to your IDE (free)

How to use
genericSignature
method
in
org.eclipse.jdt.internal.compiler.lookup.MethodBinding

Best Java code snippets using org.eclipse.jdt.internal.compiler.lookup.MethodBinding.genericSignature (Showing top 20 results out of 315)

origin: org.eclipse.jdt.core.compiler/ecj

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: org.eclipse.jdt/org.eclipse.jdt.core

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}
 
origin: com.vaadin/vaadin-client-compiler-deps

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: org.eclipse.scout.sdk.deps/ecj

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: trylimits/Eclipse-Postfix-Code-Completion

static boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}

origin: com.ovea.tajin.server/tajin-server-tomcat7

boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}
boolean isAcceptableReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod) {
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}
boolean isAcceptableReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod) {
origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

boolean hasGenericParameter(MethodBinding method) {
  if (method.genericSignature() == null) return false;

  // may be only the return type that is generic, need to check parameters
  TypeBinding[] params = method.parameters;
  for (int i = 0, l = params.length; i < l; i++) {
    TypeBinding param = params[i].leafComponentType();
    if (param instanceof ReferenceBinding) {
      int modifiers = ((ReferenceBinding) param).modifiers;
      if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
        return true;
    }
  }
  return false;
}
boolean isAcceptableReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod) {
origin: org.eclipse.tycho/org.eclipse.jdt.core

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: trylimits/Eclipse-Postfix-Code-Completion

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public static char[] getSignature(MethodBinding methodBinding) {
  char[] result = null;
  int oldMod = methodBinding.modifiers;
  //TODO remove the next line when method from binary type will be able to generate generic signature
  methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
  result = methodBinding.genericSignature();
  if(result == null) {
    result = methodBinding.signature();
  }
  methodBinding.modifiers = oldMod;
  if (result != null) {
    result = CharOperation.replaceOnCopy(result, '/', '.');
  }
  return result;
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public void consumeMethod(char[] selector, char[] signature) {
  if (this.typeBinding == null)
    return;
  MethodBinding[] methods = ((ReferenceBinding) this.typeBinding).availableMethods(); // resilience
   for (int i = 0, methodLength = methods.length; i < methodLength; i++) {
    MethodBinding method = methods[i];
    if (CharOperation.equals(selector, method.selector) || (selector.length == 0 && method.isConstructor())) {
      char[] methodSignature = method.genericSignature();
      if (methodSignature == null)
        methodSignature = method.signature();
      if (CharOperation.equals(signature, methodSignature)) {
        this.typeBinding = null;
        this.methodBinding = method;
        this.compilerBinding = this.methodBinding;
        return;
      }
    }
  }
}
origin: org.eclipse.jdt.core.compiler/ecj

public static void annotateMethodBinding(MethodBinding method, ExternalAnnotationProvider provider, LookupEnvironment environment) {
  char[] methodSignature = method.genericSignature();
  if (methodSignature == null)
    methodSignature = method.signature();
  ITypeAnnotationWalker walker = provider.forMethod(method.selector, methodSignature, environment);
  if (walker != null && walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
    ExternalAnnotationSuperimposer visitor = new ExternalAnnotationSuperimposer(environment);
    TypeVariableBinding[] typeParams = method.typeVariables;
    for (short i = 0; i < typeParams.length; i++) {
      if (visitor.go(walker.toTypeParameter(false, i)))
        typeParams[i] = visitor.superimpose(typeParams[i], TypeVariableBinding.class);
    }
    if (!method.isConstructor()) {
      if (visitor.go(walker.toMethodReturn()))
        method.returnType = visitor.superimpose(method.returnType, TypeBinding.class);
    }
    TypeBinding[] parameters = method.parameters;
    for (short i = 0; i < parameters.length; i++) {
      if (visitor.go(walker.toMethodParameter(i)))
        parameters[i] = visitor.superimpose(parameters[i], TypeBinding.class);
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public static void annotateMethodBinding(MethodBinding method, ExternalAnnotationProvider provider, LookupEnvironment environment) {
  char[] methodSignature = method.genericSignature();
  if (methodSignature == null)
    methodSignature = method.signature();
  ITypeAnnotationWalker walker = provider.forMethod(method.selector, methodSignature, environment);
  if (walker != null && walker != ITypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
    ExternalAnnotationSuperimposer visitor = new ExternalAnnotationSuperimposer(environment);
    TypeVariableBinding[] typeParams = method.typeVariables;
    for (short i = 0; i < typeParams.length; i++) {
      if (visitor.go(walker.toTypeParameter(false, i)))
        typeParams[i] = visitor.superimpose(typeParams[i], TypeVariableBinding.class);
    }
    if (!method.isConstructor()) {
      if (visitor.go(walker.toMethodReturn()))
        method.returnType = visitor.superimpose(method.returnType, TypeBinding.class);
    }
    TypeBinding[] parameters = method.parameters;
    for (short i = 0; i < parameters.length; i++) {
      if (visitor.go(walker.toMethodParameter(i)))
        parameters[i] = visitor.superimpose(parameters[i], TypeBinding.class);
    }
  }
}
org.eclipse.jdt.internal.compiler.lookupMethodBindinggenericSignature

Javadoc

 
(param1 ... paramN)returnType thrownException1 ... thrownExceptionP 
T foo(T t) throws X   --->   (TT;)TT;LX; 
void bar(X t)   -->   (LX;)V 
 void bar(X t)   -->  (LX;)V 

Popular methods of MethodBinding

  • isConstructor
  • isStatic
  • original
    Returns the original method (as opposed to parameterized/polymorphic instances)
  • areParameterErasuresEqual
  • getAnnotations
  • isSynthetic
  • isVarargs
  • sourceMethod
  • getDefaultValue
  • isPrivate
  • typeVariables
  • <init>
  • typeVariables,
  • <init>,
  • isBridge,
  • sourceStart,
  • areParametersCompatibleWith,
  • getAccessFlags,
  • isAbstract,
  • isDefaultAbstract,
  • isFinal,
  • toString

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ImageIO (javax.imageio)
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Sublime Text 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