Package org.eclipse.php.internal.core.ast.nodes

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


    String str = "<?php class MyClass { public static $a = 4; } ; /**/MyClass::$a;?>";
    Program program = createAndParse(str);

    final ExpressionStatement statement = (ExpressionStatement) program
        .statements().get(2);
    final StaticFieldAccess staticFieldAcces = (StaticFieldAccess) statement
        .getExpression();
    IVariableBinding fieldBinding = staticFieldAcces.resolveFieldBinding();

    Assert.assertTrue(fieldBinding.isField() == true);
    Assert.assertTrue(fieldBinding.getName().equals("$a"));
    Assert.assertTrue(fieldBinding.getKind() == IBinding.VARIABLE);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.nodes.StaticFieldAccess

Copyright © 2018 www.massapicom. 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.