congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
MessageFunction.fromJava
Code IndexAdd Tabnine to your IDE (free)

How to use
fromJava
method
in
net.jhorstmann.i18n.tools.xgettext.MessageFunction

Best Java code snippets using net.jhorstmann.i18n.tools.xgettext.MessageFunction.fromJava (Showing top 5 results out of 315)

origin: jhorstmann/i18n

List<MessageFunction> getJavaFunctions() {
  if (javaFunctions == null) {
    return AsmMessageExtractor.DEFAULT_MESSAGE_FUNCTIONS;
  } else {
    int len = javaFunctions.length;
    MessageFunction[] functions = new MessageFunction[len];
    for (int i=0; i<len; i++) {
      functions[i] = MessageFunction.fromJava(javaFunctions[i]);
    }
    return Arrays.asList(functions);
  }
}
origin: jhorstmann/i18n

public static MessageFunction fromJava(String className, String signature) {
  MessageFunction fn = fromJava(signature);
  fn.setNamespace(className.replace('.', '/'));
  return fn;
}
origin: net.jhorstmann/i18n-gettext-tools

public static MessageFunction fromJava(String className, String signature) {
  MessageFunction fn = fromJava(signature);
  fn.setNamespace(className.replace('.', '/'));
  return fn;
}
origin: net.jhorstmann/i18n-gettext-tools

public static MessageFunction fromJava(String signature) {
  Matcher matcher = SIGNATURE_PATTERN.matcher(signature);
  if (matcher.matches()) {
    String returnType = matcher.group(1);
    String methodName = matcher.group(2);
    String parameters = matcher.group(3);
    String className;
    int idx = methodName.lastIndexOf('.');
    if (idx >= 0) {
      className = methodName.substring(0, idx);
      methodName = methodName.substring(idx+1);
    } else {
      className = "";
    }
    if (returnType == null) {
      returnType = "void";
    }
    return fromJava(className, returnType, methodName, parameters);
  } else {
    throw new IllegalArgumentException("Invalid java method signature '" + signature + "'");
  }
}
origin: jhorstmann/i18n

public static MessageFunction fromJava(String signature) {
  Matcher matcher = SIGNATURE_PATTERN.matcher(signature);
  if (matcher.matches()) {
    String returnType = matcher.group(1);
    String methodName = matcher.group(2);
    String parameters = matcher.group(3);
    String className;
    int idx = methodName.lastIndexOf('.');
    if (idx >= 0) {
      className = methodName.substring(0, idx);
      methodName = methodName.substring(idx+1);
    } else {
      className = "";
    }
    if (returnType == null) {
      returnType = "void";
    }
    return fromJava(className, returnType, methodName, parameters);
  } else {
    throw new IllegalArgumentException("Invalid java method signature '" + signature + "'");
  }
}
net.jhorstmann.i18n.tools.xgettextMessageFunctionfromJava

Popular methods of MessageFunction

  • fromEL
  • getContextIndex
  • getMessageIndex
  • getName
  • getNamespace
  • getPluralIndex
  • <init>
  • appendInternalName
  • getDescription
  • getParameterCount
  • setNamespace
  • validateParamIdx
  • setNamespace,
  • validateParamIdx

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Path (java.nio.file)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • 21 Best Atom Packages for 2021
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