List of usage examples for com.google.gwt.core.ext.typeinfo JRealClassType getLastModifiedTime
long getLastModifiedTime();
From source file:com.guit.rebind.binder.GuitBinderGenerator.java
License:Apache License
private Object getModificationTime(JClassType type) { if (type instanceof JRealClassType) { JRealClassType sourceRealType = (JRealClassType) type; return sourceRealType.getLastModifiedTime(); } else if (type instanceof JRawType) { JRawType r = (JRawType) type;/*from w w w .j a v a 2 s .co m*/ return r.getBaseType().getLastModifiedTime(); } else { throw new RuntimeException(type.getQualifiedSourceName() + " " + type.getClass().getCanonicalName()); } }
From source file:com.mvp4g.rebind.Mvp4gGenerator.java
License:Apache License
private boolean checkSet(TreeLogger logger, GeneratorContext ctx, Set<? extends Mvp4gElement> setOfElements) { long lastTimeGenerated = ctx.getCachedGeneratorResult().getTimeGenerated(); for (Mvp4gElement element : setOfElements) { JClassType sourceType = ctx.getTypeOracle().findType(element.getProperty("class")); if (sourceType == null) { logger.log(TreeLogger.TRACE, "Found previously dependent type that's no longer present: " + element.getProperty("class")); return false; }/* w w w. j a v a 2s. co m*/ assert sourceType instanceof JRealClassType; JRealClassType realClass = (JRealClassType) sourceType; if (realClass == null || realClass.getLastModifiedTime() > lastTimeGenerated) { return false; } } return true; }
From source file:com.mvp4g.rebind.Mvp4gGenerator.java
License:Apache License
private boolean checkEventBus(TreeLogger logger, GeneratorContext ctx) { long lastTimeGenerated = ctx.getCachedGeneratorResult().getTimeGenerated(); JClassType sourceType = ctx.getTypeOracle().findType(EventBusElement.class.getName()); if (sourceType == null) { logger.log(TreeLogger.TRACE,/*w w w . j a va2 s .c om*/ "Found previously dependent type that's no longer present: " + EventBusElement.class.getName()); return false; } assert sourceType instanceof JRealClassType; JRealClassType realClass = (JRealClassType) sourceType; if (realClass == null || realClass.getLastModifiedTime() > lastTimeGenerated) { return false; } return true; }
From source file:com.mvp4g.rebind.Mvp4gGenerator.java
License:Apache License
private boolean checkModule(TreeLogger logger, GeneratorContext ctx, JClassType module) { long lastTimeGenerated = ctx.getCachedGeneratorResult().getTimeGenerated(); if (module == null) { logger.log(TreeLogger.TRACE,// ww w. j a va 2 s .c o m "Found previously dependent type that's no longer present: " + Mvp4gModule.class.getName()); return false; } assert module instanceof JRealClassType; JRealClassType realClass = (JRealClassType) module; if (realClass == null || realClass.getLastModifiedTime() > lastTimeGenerated) { return false; } return true; }