本文整理了Java中org.jboss.errai.codegen.meta.MetaClass.hashContent()
方法的一些代码示例,展示了MetaClass.hashContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.hashContent()
方法的具体详情如下:
包路径:org.jboss.errai.codegen.meta.MetaClass
类名称:MetaClass
方法名:hashContent
暂无
代码示例来源:origin: errai/errai
private int computeHashContent() {
int hashContent = type.hashContent();
for (final BaseDependency dep: dependencies) {
hashContent ^= dep.injectable.resolution.getInjectedType().hashContent();
}
return hashContent;
}
代码示例来源:origin: errai/errai
private CacheEntry createCacheEntry(final MetaClass cachedClass) {
return new CacheEntry(cachedClass, cachedClass.hashContent());
}
代码示例来源:origin: org.jboss.errai/errai-codegen
private CacheEntry createCacheEntry(final MetaClass cachedClass) {
return new CacheEntry(cachedClass, cachedClass.hashContent());
}
代码示例来源:origin: errai/errai
private static void traceConstituentHashContents(final Injectable injectable, final String name) {
log.trace("Begin trace of hashContent for {}", name);
log.trace("Combined content: {}", injectable.hashContent());
log.trace("HashContent for injectable type: {}", injectable.getInjectedType().hashContent());
for (final Dependency dep : injectable.getDependencies()) {
log.trace("HashContent for {} dep of type {}: {}", dep.getDependencyType().toString(),
dep.getInjectable().getInjectedType(), dep.getInjectable().getInjectedType().hashContent());
}
log.trace("End trace of hashContent for {}", name);
}
代码示例来源:origin: errai/errai
@Override
public RebindResult generateIncrementally(final TreeLogger logger, final GeneratorContext context, final String typeName) throws UnableToCompleteException {
final String fullyQualifiedTypeName = distillTargetTypeName(typeName);
final MetaClass type = MetaClassFactory.get(fullyQualifiedTypeName);
final String className = MarshallerGeneratorFactory.getMarshallerImplClassName(type, true);
final String marshallerTypeName = packageName + "." + className;
final MetaClass cachedType = cachedPortableTypes.get(fullyQualifiedTypeName);
final PrintWriter printWriter = context.tryCreate(logger, packageName, className);
if (printWriter != null) {
if (!RebindUtils.NO_CACHE && cachedType != null && cachedType.hashContent() == type.hashContent()) {
log.debug("Reusing cached marshaller for {}", fullyQualifiedTypeName);
printWriter.append(cachedSourceByTypeName.get(fullyQualifiedTypeName));
context.commit(logger, printWriter);
} else {
log.debug("Generating marshaller for {}", fullyQualifiedTypeName);
final String generatedSource = generateMarshaller(context, type, className, marshallerTypeName, logger, printWriter);
cachedPortableTypes.put(fullyQualifiedTypeName, type);
cachedSourceByTypeName.put(fullyQualifiedTypeName, generatedSource);
}
return new RebindResult(RebindMode.USE_ALL_NEW, marshallerTypeName);
} else {
log.debug("Reusing existing marshaller for {}", fullyQualifiedTypeName);
return new RebindResult(RebindMode.USE_EXISTING, marshallerTypeName);
}
}
代码示例来源:origin: org.jboss.errai/errai-marshalling
@Override
public RebindResult generateIncrementally(final TreeLogger logger, final GeneratorContext context, final String typeName) throws UnableToCompleteException {
final String fullyQualifiedTypeName = distillTargetTypeName(typeName);
final MetaClass type = MetaClassFactory.get(fullyQualifiedTypeName);
final String className = MarshallerGeneratorFactory.getMarshallerImplClassName(type, true);
final String marshallerTypeName = packageName + "." + className;
final MetaClass cachedType = cachedPortableTypes.get(fullyQualifiedTypeName);
final PrintWriter printWriter = context.tryCreate(logger, packageName, className);
if (printWriter != null) {
if (!RebindUtils.NO_CACHE && cachedType != null && cachedType.hashContent() == type.hashContent()) {
log.debug("Reusing cached marshaller for {}", fullyQualifiedTypeName);
printWriter.append(cachedSourceByTypeName.get(fullyQualifiedTypeName));
context.commit(logger, printWriter);
} else {
log.debug("Generating marshaller for {}", fullyQualifiedTypeName);
final String generatedSource = generateMarshaller(context, type, className, marshallerTypeName, logger, printWriter);
cachedPortableTypes.put(fullyQualifiedTypeName, type);
cachedSourceByTypeName.put(fullyQualifiedTypeName, generatedSource);
}
return new RebindResult(RebindMode.USE_ALL_NEW, marshallerTypeName);
} else {
log.debug("Reusing existing marshaller for {}", fullyQualifiedTypeName);
return new RebindResult(RebindMode.USE_EXISTING, marshallerTypeName);
}
}
代码示例来源:origin: org.jboss.errai/errai-codegen
sb.append(getSuperClass().hashContent());
代码示例来源:origin: errai/errai
sb.append(getSuperClass().hashContent());
内容来源于网络,如有侵权,请联系作者删除!