Java Code Examples for java.lang.String#replace()
The following examples show how to use
java.lang.String#replace() .
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 File: Assembler.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 2
Source File: Assembler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 3
Source File: Assembler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 4
Source File: Assembler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 5
Source File: Assembler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 6
Source File: Assembler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 7
Source File: Assembler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 8
Source File: Assembler.java From hottub with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 9
Source File: Assembler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 10
Source File: Assembler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 11
Source File: Assembler.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 12
Source File: Assembler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 13
Source File: Assembler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private String createClassJcovElement(Environment env, ClassDefinition c) { String SourceClass = (Type.mangleInnerType((c.getClassDeclaration()).getName())).toString(); String ConvSourceClass; String classJcovLine; SourceClassList.addElement(SourceClass); ConvSourceClass = SourceClass.replace('.', '/'); classJcovLine = JcovClassLine + ConvSourceClass; classJcovLine = classJcovLine + " ["; String blank = ""; for (int i = 0; i < arrayModifiers.length; i++ ) { if ((c.getModifiers() & arrayModifiers[i]) != 0) { classJcovLine = classJcovLine + blank + opNames[arrayModifiersOpc[i]]; blank = " "; } } classJcovLine = classJcovLine + "]"; return classJcovLine; }
Example 14
Source File: OAuthMediator.java From micro-integrator with Apache License 2.0 | 5 votes |
private String removeLeadingAndTrailingQuatation(String base) { String result = base; if (base.startsWith("\"") || base.endsWith("\"")) { result = base.replace("\"", ""); } return result.trim(); }
Example 15
Source File: APITemplateBuilderImpl.java From carbon-apimgt with Apache License 2.0 | 4 votes |
@Override public String getConfigStringForDefaultAPITemplate(String defaultVersion) throws APITemplateException { StringWriter writer = new StringWriter(); try { VelocityEngine velocityengine = new VelocityEngine(); if (!"not-defined".equalsIgnoreCase(getVelocityLogger())) { velocityengine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, CommonsLogLogChute.class.getName()); velocityengine.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath"); velocityengine.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName()); } velocityengine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, CarbonUtils.getCarbonHome()); initVelocityEngine(velocityengine); ConfigContext configcontext = new APIConfigContext(this.api); configcontext = new TransportConfigContext(configcontext, api); configcontext = new ResourceConfigContext(configcontext, api); configcontext = new TemplateUtilContext(configcontext); VelocityContext context = configcontext.getContext(); context.put("defaultVersion", defaultVersion); String fwdApiContext = this.api.getContext(); if (fwdApiContext != null && fwdApiContext.charAt(0) == '/') { fwdApiContext = fwdApiContext.substring(1); } context.put("fwdApiContext", fwdApiContext); // for default version, we remove the {version} param from the apiContext String apiContext = this.api.getContextTemplate(); if(apiContext.contains("{version}")){ apiContext = apiContext.replace("/{version}",""); apiContext = apiContext.replace("{version}",""); } context.put("apiContext", apiContext); Template t = velocityengine.getTemplate(this.getDefaultAPITemplatePath()); t.merge(context, writer); } catch (Exception e) { log.error("Velocity Error", e); throw new APITemplateException("Velocity Error", e); } return writer.toString(); }