for(Iterator method_it=icd.getMethods(); method_it.hasNext(); ) {
MethodDescriptor md=(MethodDescriptor)method_it.next();
if( md.isConstructor() ){
- md.addParameter( theTypeDesc, "surrounding$" + String.valueOf(depth) );
- initializeOuterMember( md, "this$" + String.valueOf( depth ), "surrounding$" + String.valueOf(depth) );
+ md.addParameter( theTypeDesc, "surrounding___DOLLAR___" + String.valueOf(depth) );
+ initializeOuterMember( md, "this___DOLLAR___" + String.valueOf( depth ), "surrounding___DOLLAR___" + String.valueOf(depth) );
//System.out.println( "The added param is " + md.toString() + "\n" );
}
}
tempChildNode.addChild("identifier").addChild ( tempCopy );
theNode.addChild("type").addChild( theTypeNode );
ParseNode variableDeclaratorID = new ParseNode("single");
- String theStr = "this$" + String.valueOf( depth );
+ String theStr = "this___DOLLAR___" + String.valueOf( depth );
variableDeclaratorID.addChild( theStr );
ParseNode variableDeclarator = new ParseNode( "variable_declarator" );
variableDeclarator.addChild( variableDeclaratorID );
if(icd.getSurroundingDesc()==ltd.getClassDesc()) {
// this is a surrounding class access inside an inner class
fan.setExpression(nn);
- fan.setFieldName("this$0");
- fd = (FieldDescriptor)icd.getFieldTable().get("this$0");
+ fan.setFieldName("this___DOLLAR___0");
+ fd = (FieldDescriptor)icd.getFieldTable().get("this___DOLLAR___0");
} else if(icd==ltd.getClassDesc()) {
// this is an inner class this operation
fd = new FieldDescriptor(new Modifiers(),new TypeDescriptor(icd),"this",null,false);
String composed = "this";
NameDescriptor runningDesc = new NameDescriptor( "this" );;
- composed = "this$" + String.valueOf(startingDepth-depth-1);
+ composed = "this___DOLLAR___" + String.valueOf(startingDepth-depth-1);
runningDesc = new NameDescriptor(runningDesc, composed);
NameDescriptor idDesc = new NameDescriptor( runningDesc, varname );
int index = 0;
while(it_fields.hasNext()) {
FieldDescriptor fd = (FieldDescriptor)(it_fields.next());
- if(fd.getSymbol().startsWith("this$")) {
- con.addArgument(new NameNode(new NameDescriptor("this$"+index)));
+ if(fd.getSymbol().startsWith("this___DOLLAR___")) {
+ con.addArgument(new NameNode(new NameDescriptor("this___DOLLAR___"+index)));
index++;
}
}
if(cd.getSuperDesc().isInnerClass()&&!cd.getSuperDesc().isStatic()&&!cd.getSuperDesc().getInStaticContext()) {
// for a super class that is also an inner class with surrounding reference, add the surrounding
// instance of the child instance as the parent instance's surrounding instance
- min.addArgument(new NameNode(new NameDescriptor("surrounding$0")));
+ min.addArgument(new NameNode(new NameDescriptor("surrounding___DOLLAR___0")));
}
}
for(int i = 0 ; i < tdarray.length; i++) {
NameDescriptor runningDesc = new NameDescriptor( "this" );;
for ( int index = startingDepth; index > depth; --index ) {
- composed = "this$" + String.valueOf( index - 1 );
+ composed = "this___DOLLAR___" + String.valueOf( index - 1 );
runningDesc = new NameDescriptor( runningDesc, composed );
}
if( false == cd.isInnerClass() )
- runningDesc = new NameDescriptor( runningDesc, "this$" + String.valueOf(0) ); //all the way up.
+ runningDesc = new NameDescriptor( runningDesc, "this___DOLLAR___" + String.valueOf(0) ); //all the way up.
return new NameNode(runningDesc);
}
// for a super class that is also an inner class with surrounding reference, add the surrounding
// instance of the child instance as the parent instance's surrounding instance
if(((MethodDescriptor)md).isConstructor()) {
- min.addArgument(new NameNode(new NameDescriptor("surrounding$0")));
+ min.addArgument(new NameNode(new NameDescriptor("surrounding___DOLLAR___0")));
} else if(((MethodDescriptor)md).getClassDesc().isInnerClass()&&!((MethodDescriptor)md).getClassDesc().isStatic()&&!((MethodDescriptor)md).getClassDesc().getInStaticContext()) {
- min.addArgument(new NameNode(new NameDescriptor("this$0")));
+ min.addArgument(new NameNode(new NameDescriptor("this___DOLLAR___0")));
}
}
tdarray=new TypeDescriptor[min.numArgs()];