mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 18:15:55 +00:00
Use a ClassLiteralAccess instead of a NameReference
This commit is contained in:
1 parent
0c7b29f8e7
commit
529a480ca9
1 file changed
+5
-1
@@ -35,6 +35,7 @@ import lombok.eclipse.EclipseNode;
|
||||
import lombok.eclipse.handlers.EclipseHandlerUtil.MemberExistsResult;
|
||||
|
||||
import org.eclipse.jdt.internal.compiler.ast.Annotation;
|
||||
import org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess;
|
||||
import org.eclipse.jdt.internal.compiler.ast.Expression;
|
||||
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
|
||||
import org.eclipse.jdt.internal.compiler.ast.MessageSend;
|
||||
@@ -261,7 +262,10 @@ public class HandleLog {
|
||||
}
|
||||
|
||||
Expression createFactoryParameter(String typeName, Annotation source){
|
||||
return createNameReference(typeName + ".class", source);
|
||||
TypeReference type = createTypeReference(typeName, source);
|
||||
ClassLiteralAccess result = new ClassLiteralAccess(source.sourceEnd, type);
|
||||
Eclipse.setGeneratedBy(result, source);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user