Examples of ClassInstanceCreation


Examples of org.eclipse.jdt.core.dom.ClassInstanceCreation

    @Override
    protected void repairBug(ASTRewrite rewrite, CompilationUnit workingUnit, BugInstance bug) throws BugResolutionException {
        assert rewrite != null;
        assert workingUnit != null;

        ClassInstanceCreation primitiveTypeCreation = findPrimitiveTypeCreation(getASTNode(workingUnit,
                bug.getPrimarySourceLineAnnotation()));
        if (primitiveTypeCreation == null) {
            throw new BugResolutionException("Primitive type creation not found.");
        }
        MethodInvocation valueOfInvocation = createValueOfInvocation(rewrite, workingUnit, primitiveTypeCreation);
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.ClassInstanceCreation

        return getBasicName(func.getFunctionName().getName());
      case ASTNode.STATIC_METHOD_INVOCATION:
        StaticMethodInvocation st = (StaticMethodInvocation) node;
        return getBasicName(st.getMethod());
      case ASTNode.CLASS_INSTANCE_CREATION:
        ClassInstanceCreation ci = (ClassInstanceCreation) node;
        if (ci.getClassName() != null) {
          return getBasicName(ci.getClassName().getName());
        }
      case ASTNode.VARIABLE:
        return getBasicName(((Variable)node).getName());
      case ASTNode.IDENTIFIER:
      case ASTNode.NAMESPACE_NAME:
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.ClassInstanceCreation

    super(goal);
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    ClassInstanceCreation expression = (ClassInstanceCreation) typedGoal
        .getExpression();
    Expression className = expression.getClassName();
    if ((className instanceof TypeReference)) {
      if (isSelf((TypeReference) className)
          && (goal.getContext() instanceof MethodContext)) {
        MethodContext methodContext = (MethodContext) goal.getContext();
        result = methodContext.getInstanceType();
View Full Code Here

Examples of org.netbeans.modules.php.editor.parser.astnodes.ClassInstanceCreation

                    Variable leftVariable = null;
                    VariableBase leftHandSide = node.getLeftHandSide();
                    if (leftHandSide instanceof Variable) {
                        leftVariable = (Variable) leftHandSide;
                    }
                    ClassInstanceCreation instance = (ClassInstanceCreation) rightHandSide;
                    String variable = CodeUtils.extractVariableName(leftVariable);
                    String className = CodeUtils.extractQualifiedName(instance.getClassName().getName());
                    instances.put(variable, className);
                }
            }
            super.visit(node);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.