Codota Logo
AsmMethod.getGenericKey
Code IndexAdd Codota to your IDE (free)

How to use
getGenericKey
method
in
org.sonar.java.bytecode.asm.AsmMethod

Best Java code snippets using org.sonar.java.bytecode.asm.AsmMethod.getGenericKey (Showing top 3 results out of 315)

  • Common ways to obtain AsmMethod
private void myMethod () {
AsmMethod a =
  • Codota IconAsmEdge asmEdge;(AsmMethod) asmEdge.getTo()
  • Smart code suggestions by Codota
}
origin: org.codehaus.sonar-plugins.java/java-squid

protected final int getMethodLineNumber(AsmMethod asmMethod) {
 MethodSignature methodSignature = MethodSignatureScanner.scan(asmMethod.getGenericKey());
 AsmClass asmClass = asmMethod.getParent();
 Integer result = javaResourceLocator.getMethodStartLine(asmClass.getInternalName() + "#" + MethodSignaturePrinter.print(methodSignature));
 if (result != null) {
  return result;
 }
 return -1;
}
origin: org.sonarsource.java/java-squid

protected final int getMethodLineNumber(AsmMethod asmMethod) {
 MethodSignature methodSignature = MethodSignatureScanner.scan(asmMethod.getGenericKey());
 AsmClass asmClass = asmMethod.getParent();
 Integer result = context.getJavaResourceLocator().getMethodStartLine(asmClass.getInternalName() + "#" + MethodSignaturePrinter.print(methodSignature));
 if (result != null) {
  return result;
 }
 return -1;
}
origin: org.codehaus.sonar-plugins.java/java-checks

@Override
public void visitMethod(AsmMethod asmMethod) {
 if (isPrivateUnused(asmMethod) && !isExcludedFromCheck(asmMethod)) {
  String messageStr = "Private method '" + asmMethod.getName() + "' is never used.";
  if ("<init>".equals(asmMethod.getName())) {
   messageStr = "Private constructor '" + asmClass.getDisplayName() + "(";
   List<String> params = Lists.newArrayList();
   for (Parameter param : MethodSignatureScanner.scan(asmMethod.getGenericKey()).getArgumentTypes()) {
    String paramName = param.getClassName();
    if (StringUtils.isEmpty(paramName)) {
     paramName = MethodSignatureScanner.getReadableType(param.getJvmJavaType());
    }
    params.add(paramName + (param.isArray() ? "[]" : ""));
   }
   messageStr += Joiner.on(",").join(params) + ")' is never used.";
  }
  CheckMessage message = new CheckMessage(this, messageStr);
  int line = getMethodLineNumber(asmMethod);
  if (line > 0) {
   message.setLine(line);
  }
  SourceFile file = getSourceFile(asmClass);
  file.log(message);
 }
}
org.sonar.java.bytecode.asmAsmMethodgetGenericKey

Popular methods of AsmMethod

  • getKey
  • getParent
  • isConstructor
  • isUsed
  • <init>
  • addEdge
  • addThrowsOfClasses
  • addUsesOfClasses
  • clearOutogingEdges
  • computeAccessedField
  • getAccessedField
  • getOutgoingEdges
  • getAccessedField,
  • getOutgoingEdges,
  • isAccessor,
  • isBodyLoaded,
  • isCallToNonStaticInternalField,
  • isCallToNonStaticInternalMethod,
  • isFieldAccesingDifferentField,
  • isMethodNotAccessorOrAccessingDifferentField,
  • isStatic

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • BoxLayout (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now