<groupId>com.googlecode.jtype</groupId> <artifactId>jtype</artifactId> <version>0.1.1</version>
53545556575859
super(name); } public void setUp() throws Exception { super.setUp(); groupsComputer = new GroupsComputer(); }
6061626364656667686970
* {@inheritDoc} */ public ElementDescriptor.ConstraintFinder unorderedAndMatchingGroups(Class<?>... groups) { Set<ConstraintValidation<?>> matchingDescriptors = new HashSet<ConstraintValidation<?>>(constraintDescriptors.size()); Groups groupChain = new GroupsComputer().computeGroups(groups); for (Group group : groupChain.getGroups()) { if (group.isDefault()) { // If group is default, check if it gets redefined List<Group> expandedDefaultGroup = metaBean.getFeature(Jsr303Features.Bean.GROUP_SEQUENCE); for (Group defaultGroupMember : expandedDefaultGroup) {
5051525354555657585960
} public ElementDescriptor.ConstraintFinder unorderedAndMatchingGroups(Class<?>... groups) { Set<ConstraintValidation> matchingDescriptors = new HashSet<ConstraintValidation>(constraintDescriptors.size()); Groups groupChain = new GroupsComputer().computeGroups(groups); for (Group group : groupChain.getGroups()) { if ( group.isDefault() ) { // If group is default, check if it gets redefined List<Group> expandedDefaultGroup = metaBean.getFeature(Jsr303Features.Bean.GROUP_SEQUENCE); for ( Group defaultGroupMember : expandedDefaultGroup ) {
5455565758596061626364
82838485868788
path = PathImpl.create(name); } else { path = PathImpl.copy(propertyPath); path.addNode(new NodeImpl(name)); } return new NodeBuilderDefinedContextImpl(parent, messageTemplate, path); }
104105106107108109110111
/** * {@inheritDoc} */ @Override public void moveDown(MetaProperty prop, AccessStrategy access) { path.addNode(new NodeImpl(prop.getName())); super.moveDown(prop, access); }
174175176177178179180181182
* @return the path in dot notation */ public PathImpl getPropertyPath() { PathImpl currentPath = PathImpl.copy(path); if (getMetaProperty() != null) { currentPath.addNode(new NodeImpl(getMetaProperty().getName())); } return currentPath; }
230231232233234235236237238239240
} } private boolean isReachable(GroupValidationContext<?> context) { PathImpl path = context.getPropertyPath(); NodeImpl node = path.getLeafNode(); PathImpl beanPath = path.getPathWithoutLeafNode(); if (beanPath == null) { beanPath = PathImpl.create(null); } try {
548549550551552553554555556557558
*/ private boolean isCascadable(GroupValidationContext<?> context, MetaProperty prop, AccessStrategy access) { PathImpl beanPath = context.getPropertyPath(); NodeImpl node = new NodeImpl(prop.getName()); if (beanPath == null) { beanPath = PathImpl.create(null); } try { if (!context.getTraversableResolver().isReachable(
134135136137138139140141142143144145146147
assertEquals(null, path.iterator().next().getName()); } public void testToString() { PathImpl path = PathImpl.create(null); path.addNode(new NodeImpl("firstName")); assertEquals("firstName", path.toString()); path = PathImpl.create(null); path.getLeafNode().setIndex(2); assertEquals("[2]", path.toString()); path.addNode(new NodeImpl("firstName")); assertEquals("[2].firstName", path.toString()); }