public Node setArrayDimensionsOfType(Node value, List<String> bracketPairs) { //TODO test a public int foo() [] {} method declaration. int arrayDims = bracketPairs == null ? 0 : bracketPairs.size(); if (arrayDims == 0) return value; TypeReference ref = new TypeReference().astArrayDimensions(arrayDims); if (value instanceof TypeReference) { TypeReference orig = (TypeReference)value; ref.astWildcard(orig.astWildcard()); ref.rawParts().migrateAllFrom(orig.rawParts()); } return posify(ref); }
public Node setArrayDimensionsOfType(Node value, List<String> bracketPairs) { //TODO test a public int foo() [] {} method declaration. int arrayDims = bracketPairs == null ? 0 : bracketPairs.size(); if (arrayDims == 0) return value; TypeReference ref = new TypeReference().astArrayDimensions(arrayDims); if (value instanceof TypeReference) { TypeReference orig = (TypeReference)value; ref.astWildcard(orig.astWildcard()); ref.rawParts().migrateAllFrom(orig.rawParts()); } return posify(ref); }
public Node setArrayDimensionsOfType(Node value, List<String> bracketPairs) { //TODO test a public int foo() [] {} method declaration. int arrayDims = bracketPairs == null ? 0 : bracketPairs.size(); if (arrayDims == 0) return value; TypeReference ref = new TypeReference().astArrayDimensions(arrayDims); if (value instanceof TypeReference) { TypeReference orig = (TypeReference)value; ref.astWildcard(orig.astWildcard()); ref.rawParts().migrateAllFrom(orig.rawParts()); } return posify(ref); }
public Node createEnumBody(Node head, List<Node> tail, Node typeBody) { EnumTypeBody body = new EnumTypeBody(); if (head != null) body.rawConstants().addToEnd(head); if (tail != null) for (Node n : tail) body.rawConstants().addToEnd(n); if (typeBody instanceof TypeBody) { body.rawMembers().migrateAllFrom(((TypeBody)typeBody).rawMembers()); } return posify(body); }
public Node createEnumBody(Node head, List<Node> tail, Node typeBody) { EnumTypeBody body = new EnumTypeBody(); if (head != null) body.rawConstants().addToEnd(head); if (tail != null) for (Node n : tail) body.rawConstants().addToEnd(n); if (typeBody instanceof TypeBody) { body.rawMembers().migrateAllFrom(((TypeBody)typeBody).rawMembers()); } return posify(body); }
public Node createEnumBody(Node head, List<Node> tail, Node typeBody) { EnumTypeBody body = new EnumTypeBody(); if (head != null) body.rawConstants().addToEnd(head); if (tail != null) for (Node n : tail) body.rawConstants().addToEnd(n); if (typeBody instanceof TypeBody) { body.rawMembers().migrateAllFrom(((TypeBody)typeBody).rawMembers()); } return posify(body); }