type = builder.build(); userOrdered = isUserOrdered; elementCountConstraint = EffectiveStmtUtils.createElementCountConstraint(this).orElse(null);
Effective(final StmtContext<String, AnnotationStatement, ?> ctx) { super(ctx); path = ctx.coerceParentContext().getSchemaPath().get().createChild( StmtContextUtils.parseIdentifier(ctx, argument())); final TypeEffectiveStatement<?> typeStmt = SourceException.throwIfNull( firstSubstatementOfType(TypeEffectiveStatement.class), ctx.getStatementSourceReference(), "AnnotationStatementSupport %s is missing a 'type' statement", argument()); final ConcreteTypeBuilder<?> builder = ConcreteTypes.concreteTypeBuilder(typeStmt.getTypeDefinition(), path); final StmtContext<String, ?, ?> unitsStmt = StmtContextUtils.findFirstEffectiveSubstatement(ctx, UnitsStatement.class); if (unitsStmt != null) { builder.setUnits(unitsStmt.getStatementArgument()); } type = builder.build(); }
type = builder.build(); mandatory = findFirstEffectiveSubstatementArgument(MandatoryEffectiveStatement.class).orElse(Boolean.FALSE) .booleanValue();