Class ReferenceBuilder

java.lang.Object
spoon.support.compiler.jdt.ReferenceBuilder

public class ReferenceBuilder extends Object
  • Method Details

    • getPackageReference

      public CtPackageReference getPackageReference(String name)
    • getTypeReference

      public <T> CtTypeReference<T> getTypeReference(String name)
      Try to build a CtTypeReference from a simple name with specified generic types but returns null if the name doesn't correspond to a type (not start by an upper case).
    • getLambdaExecutableReference

      public CtExecutableReference<?> getLambdaExecutableReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference singleNameReference)
      In noclasspath, lambda doesn't have always a binding for their variables accesses in their block/expression. Here, we make the job of JDT and bind their variables accesses to their parameters.
      Parameters:
      singleNameReference - Name of the variable access.
      Returns:
      executable reference which corresponds to the lambda.
    • getModuleReference

      public CtModuleReference getModuleReference(org.eclipse.jdt.internal.compiler.ast.ModuleReference moduleReference)