ExprModel { public void seal() { seal(null); }  T register(T expr); void setCurrentParserContext(ParserRuleContext currentParserContext); void unregister(Expr expr); Map<String, Expr> getExprMap(); int size(); ComparisonExpr comparison(String op, Expr left, Expr right); InstanceOfExpr instanceOfOp(Expr expr, String type); FieldAccessExpr field(Expr parent, String name); FieldAccessExpr observableField(Expr parent, String name); SymbolExpr symbol(String text, Class type); TernaryExpr ternary(Expr pred, Expr ifTrue, Expr ifFalse); IdentifierExpr identifier(String name); StaticIdentifierExpr staticIdentifier(String name); StaticIdentifierExpr staticIdentifierFor(final ModelClass modelClass); MethodCallExpr methodCall(Expr target, String name, List<Expr> args); MathExpr math(Expr left, String op, Expr right); TernaryExpr logical(Expr left, String op, Expr right); BitShiftExpr bitshift(Expr left, String op, Expr right); UnaryExpr unary(String op, Expr expr); Expr group(Expr grouped); Expr resourceExpr(String packageName, String resourceType, String resourceName,
            List<Expr> args); Expr bracketExpr(Expr variableExpr, Expr argExpr); Expr castExpr(String type, Expr expr); List<Expr> getBindingExpressions(); StaticIdentifierExpr addImport(String alias, String type, Location location); Map<String, String> getImports(); Expr bindingExpr(Expr bindingExpr); List<Expr> getObservables(); void seal(); void seal(ResolveListenersCallback resolveListeners); int getFlagBucketCount(); int getTotalFlagCount(); int getInvalidateableFieldLimit(); String[] getFlagMapping(); String getFlag(int id); List<Expr> getPendingExpressions(); boolean markBitsRead(); static List<Expr> filterShouldRead(Iterable<Expr> exprs); Expr findFlagExpression(int flag); BitSet getInvalidateAnyBitSet(); Expr argListExpr(Iterable<Expr> expressions); void setCurrentLocationInFile(Location location);  }
@Test public void testStaticMethodOfInstance() { LayoutBinder lb = new MockLayoutBinder(); mExprModel = lb.getModel(); lb.addVariable("user", User.class.getCanonicalName(), null); MethodCallExpr methodCall = parse(lb, "user.ourStaticMethod()", MethodCallExpr.class); assertTrue(methodCall.isDynamic()); mExprModel.seal(); final Expr child = methodCall.getTarget(); assertTrue(child instanceof StaticIdentifierExpr); StaticIdentifierExpr id = (StaticIdentifierExpr) child; assertEquals(id.getResolvedType().getCanonicalName(), User.class.getCanonicalName()); }