public static Object[] validTriggerBlockMembers(List<BlockMember> values) { final List<Object> children = new ArrayList<>(); for (BlockMember member : values) { if (member != null) { // the parser can produce partial jADT with null members member._switch(new TriggerMemberFilter(children)); } } // Basically just the main members, minus any statements return children.toArray(); }
public static Object[] childrenOf(BlockMember classMember) { NestedClassMemberFilter filter = new NestedClassMemberFilter(); classMember._switch(filter); return filter.getChildren().toArray(); }