Java 类org.joda.time.base.BasePartial 实例源码

项目:jfixture    文件:BasePartialRelay.java   
@Override
public Object create(Object request, SpecimenContext context) {

    if (!(request instanceof SpecimenType)) {
        return new NoSpecimen();
    }

    SpecimenType type = (SpecimenType) request;
    if (!BasePartial.class.isAssignableFrom(type.getRawType())) {
        return new NoSpecimen();
    }

    try {
        Date date = (Date) context.resolve(Date.class);
        long instant = date.getTime();
        return type.getRawType().getDeclaredConstructor(long.class).newInstance(instant);
    } catch (Exception e) {
        e.printStackTrace();
        return new NoSpecimen();
    }
}
项目:fenixedu-academic    文件:InstitutionPrecedentDegreeInformation.java   
@Override
public LocalDate getConclusionDate() {
    final BasePartial date =
            isBolonha() ? (getStudentCurricularPlan().getCycle(getCycleType()) != null ? getStudentCurricularPlan()
                    .getConclusionDate(getCycleType()) : null) : getRegistration().getConclusionDate();
    return date != null ? new LocalDate(date) : null;
}
项目:fenixedu-academic    文件:HourMinuteSecond.java   
/**
 * Constructs a HourMinuteSecond with chronology from this instance and new
 * values.
 * 
 * @param partial
 *            the partial to base this new instance on
 * @param values
 *            the new set of values
 */
public HourMinuteSecond(BasePartial partial, int[] values) {
    super(partial, values);
}
项目:fenixedu-academic    文件:HourMinuteSecond.java   
/**
 * Constructs a HourMinuteSecond with values from this instance and a new
 * chronology.
 * 
 * @param partial
 *            the partial to base this new instance on
 * @param chrono
 *            the new chronology
 */
public HourMinuteSecond(BasePartial partial, Chronology chrono) {
    super(partial, chrono);
}