Community
Participate
Working Groups
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
buffer.append('/');
}
break;
case C_DOLLAR :
innerTypeStart = buffer.length();
inAnonymousType = false;
if (resolved) {
// once we hit "$" there are no more package prefixes
removePackageQualifiers = false;
/**
* Convert '$' in resolved type signatures into '.'.
* NOTE: This assumes that the type signature is an inner type
* signature. This is true in most cases, but someone can define a
* non-inner type name containing a '$'.
*/
buffer.append('.');
default :
if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
inAnonymousType = true;
public static char[] createNonGenericTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
return Signature.createCharArrayTypeSignature(CharOperation.replaceOnCopy(qualifiedTypeName, '.', '$'), true);
return Signature.createCharArrayTypeSignature(qualifiedTypeName, true);
public static char[] createTypeSignature(char[] qualifiedPackageName, char[] qualifiedTypeName) {
char[] name = new char[qualifiedTypeName.length];
* Copyright (c) 2005, 2010 IBM Corporation and others.
* Copyright (c) 2005, 2011 IBM Corporation and others.
return this.token;
case '$':
case '~':
if (this.index == previousTokenEnd) {
this.start = this.index+1;
return;
consumeTopLevelType();
parseInnerType();
//parseInnerType();
if (this.scanner.isAtParametersStart()) {
this.scanner.skipParametersStart();
getDefaultOptions()
);
public void testBUG317281() {
CompilationUnitDeclaration declaration = this.runInferTest(
"function A$b(){\n"+
"}\n" +
"A$b.prototype.fun1 = function() {};\n",
"X.js",
"class A$b extends Object{\n void fun1()\n A$b()\n}\n",
public void testBUG343691() {
"function $(){\n"+
"$.hasData = function(element) {};\n" +
"$.prototype.jquery = \"\";\n",
"class $ extends Object{\n String jquery;\n $()\n static void hasData(element)\n}\n",