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

下面列出了怎么用org.joda.time.base.BasePartial的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: 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();
    }
}
 
@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;
}
 
源代码3 项目: 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);
}
 
源代码4 项目: 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);
}
 
 类所在包
 类方法
 同包方法