Java Code Examples for com.apple.internal.jobjc.generator.Utils.Substituter

The following examples show how to use com.apple.internal.jobjc.generator.Utils.Substituter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dragonwell8_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 2
Source Project: dragonwell8_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 3
Source Project: dragonwell8_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 4
Source Project: TencentKona-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 5
Source Project: TencentKona-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 6
Source Project: TencentKona-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 7
Source Project: jdk8u60   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 8
Source Project: jdk8u60   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 9
Source Project: jdk8u60   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 10
Source Project: openjdk-jdk8u   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 11
Source Project: openjdk-jdk8u   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 12
Source Project: openjdk-jdk8u   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 13
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 14
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 15
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 16
Source Project: jdk8u-jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 17
Source Project: jdk8u-jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 18
Source Project: jdk8u-jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 19
Source Project: hottub   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 20
Source Project: hottub   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 21
Source Project: hottub   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 22
Source Project: openjdk-8-source   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 23
Source Project: openjdk-8-source   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 24
Source Project: openjdk-8-source   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 25
Source Project: openjdk-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 26
Source Project: openjdk-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 27
Source Project: openjdk-8   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}
 
Example 28
Source Project: jdk8u_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private $CLASS $IVAR = null;~" +
        "#public $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 29
Source Project: jdk8u_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static String makeStaticSingleton(final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    return generateSingleton(new Substituter(
        "#private static $CLASS $IVAR = null;~" +
        "#public static $CLASS $METHOD() {~" +
        "##return $IVAR != null ? $IVAR : ($IVAR = new $CLASS($CTORARGS));~" +
        "#}~"),
    instanceVariable, methodName, className, constructorArgs);
}
 
Example 30
Source Project: jdk8u_jdk   Source File: JavaLang.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static String generateSingleton(final Substituter singleton, final String instanceVariable, final String methodName, final String className, final String...constructorArgs) {
    singleton.replace("IVAR", instanceVariable);
    singleton.replace("METHOD", methodName);
    singleton.replace("CLASS", className);
    singleton.replace("CTORARGS", Utils.joinWComma(constructorArgs));
    return singleton.toString();
}