public StringConcatenateNode(Tree tree, Node left, Node right) { super(InternalUtils.typeOf(tree)); assert tree.getKind() == Kind.PLUS; this.tree = tree; this.left = left; this.right = right; }
public LocalVariableNode(Tree t) { super(InternalUtils.typeOf(t)); // IdentifierTree for normal uses of the local variable or parameter, // and VariableTree for the translation of an initializer block assert t != null; assert t instanceof IdentifierTree || t instanceof VariableTree; tree = t; this.receiver = null; }
/** @return true if the type of the tree is a primitive */ private static final boolean isPrimitive(ExpressionTree tree) { return InternalUtils.typeOf(tree).getKind().isPrimitive(); }
/** @return true if the type of the tree is a super of String */ private final boolean isString(ExpressionTree tree) { TypeMirror type = InternalUtils.typeOf(tree); return types.isAssignable(stringType, type); }
// Handles the -Acheckclass command-line argument private boolean shouldCheckFor(ExpressionTree tree) { if (typeToCheck == null) return true; TypeMirror type = InternalUtils.typeOf(tree); return types.isSubtype(type, typeToCheck) || types.isSubtype(typeToCheck, type); }