org.jboss.errai.codegen.meta.MetaClass.isAbstract()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.jboss.errai.codegen.meta.MetaClass.isAbstract()方法的一些代码示例,展示了MetaClass.isAbstract()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.isAbstract()方法的具体详情如下:
包路径:org.jboss.errai.codegen.meta.MetaClass
类名称:MetaClass
方法名:isAbstract

MetaClass.isAbstract介绍

暂无

代码示例

代码示例来源:origin: org.jboss.errai/errai-config

private static boolean validateWildcardSerializable(MetaClass mc) {
 if (mc.isInterface() || (mc.isAbstract() && !mc.isEnum())) {
  log.debug("Serializable types cannot be an interface or abstract, ignoring: {}", mc.getFullyQualifiedName());
  return false;
 }
 return true;
}

代码示例来源:origin: errai/errai

private static boolean validateWildcardSerializable(MetaClass mc) {
 if (mc.isInterface() || (mc.isAbstract() && !mc.isEnum())) {
  log.debug("Serializable types cannot be an interface or abstract, ignoring: {}", mc.getFullyQualifiedName());
  return false;
 }
 return true;
}

代码示例来源:origin: errai/errai

private static boolean validateWildcard(MetaClass bindable) {
  if (bindable.isInterface()) {
   log.debug("@Bindable types cannot be an interface, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  else if (bindable.isAbstract()) {
   log.debug("@Bindable types cannot be abstract, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  else if (bindable.isFinal()) {
   log.debug("@Bindable types cannot be final, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  return true;
 }
}

代码示例来源:origin: org.jboss.errai/errai-data-binding

private static boolean validateWildcard(MetaClass bindable) {
  if (bindable.isInterface()) {
   log.debug("@Bindable types cannot be an interface, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  else if (bindable.isAbstract()) {
   log.debug("@Bindable types cannot be abstract, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  else if (bindable.isFinal()) {
   log.debug("@Bindable types cannot be final, ignoring: {}", bindable.getFullyQualifiedName());
   return false;
  }
  return true;
 }
}

代码示例来源:origin: errai/errai

@Override
public boolean shouldUseObjectMarshaller(final MetaClass type) {
 final boolean hasPortableSubtypes = inheritanceMap.containsKey(type.getFullyQualifiedName());
 final MappingDefinition definition = getDefinition(type);
 final boolean hasMarshaller = definition != null;
 if (hasMarshaller) {
  if (definition.getClass().isAnnotationPresent(CustomMapping.class)
    || definition.getClientMarshallerClass() != null) {
   return false;
  }
 }
 final boolean isConcrete = !(type.isAbstract() || type.isInterface());
 if (!type.isArray() && !type.isEnum() && !isConcrete && !hasPortableSubtypes) {
  throw new IllegalStateException("A field of type " + type
    + " appears in a portable class, but " + type + " has no portable implementations.");
 }
 return (hasPortableSubtypes && !hasMarshaller) || (hasPortableSubtypes && hasMarshaller && isConcrete);
}

代码示例来源:origin: org.jboss.errai/errai-marshalling

@Override
public boolean shouldUseObjectMarshaller(final MetaClass type) {
 final boolean hasPortableSubtypes = inheritanceMap.containsKey(type.getFullyQualifiedName());
 final MappingDefinition definition = getDefinition(type);
 final boolean hasMarshaller = definition != null;
 if (hasMarshaller) {
  if (definition.getClass().isAnnotationPresent(CustomMapping.class)
    || definition.getClientMarshallerClass() != null) {
   return false;
  }
 }
 final boolean isConcrete = !(type.isAbstract() || type.isInterface());
 if (!type.isArray() && !type.isEnum() && !isConcrete && !hasPortableSubtypes) {
  throw new IllegalStateException("A field of type " + type
    + " appears in a portable class, but " + type + " has no portable implementations.");
 }
 return (hasPortableSubtypes && !hasMarshaller) || (hasPortableSubtypes && hasMarshaller && isConcrete);
}

代码示例来源:origin: org.jboss.errai/errai-jaxrs-client

if (!metaClass.isAbstract() && metaClass.isAssignableTo(ClientExceptionMapper.class)) {
 MapsFrom mapsFrom = metaClass.getAnnotation(MapsFrom.class);
 if (mapsFrom == null) {

代码示例来源:origin: errai/errai

public boolean isConcrete() {
 return !isInterface()
   && !isAbstract()
   && !isSynthetic()
   && !isAnonymousClass()
   && !isPrimitive()
   && !isArray()
   && !isAnnotation()
   && !isEnum();
}

代码示例来源:origin: org.jboss.errai/errai-codegen

public boolean isConcrete() {
 return !isInterface()
   && !isAbstract()
   && !isSynthetic()
   && !isAnonymousClass()
   && !isPrimitive()
   && !isArray()
   && !isAnnotation()
   && !isEnum();
}

代码示例来源:origin: errai/errai

if ((toMap.isAbstract() || toMap.isInterface()) && !toMap.isEnum()) {
 throw new RuntimeException("cannot map an abstract class or interface: " + toMap.getFullyQualifiedName());

代码示例来源:origin: errai/errai

if (extendsBlock == null && (type.isAbstract() || type.isInterface() || type.isPrimitive()))
 throw new InvalidTypeException("Cannot instantiate type:" + type, blame);

代码示例来源:origin: org.jboss.errai/errai-codegen

if (extendsBlock == null && (type.isAbstract() || type.isInterface() || type.isPrimitive()))
 throw new InvalidTypeException("Cannot instantiate type:" + type, blame);

代码示例来源:origin: errai/errai

public static MappingDefinition map(final MetaClass toMap, final DefinitionsFactory definitionsFactory) {
 if ((toMap.isAbstract() && !toMap.isEnum()) || toMap.isInterface()) {
  throw new RuntimeException("cannot marshal an abstract class or interface: " + toMap.getFullyQualifiedName());
   final MetaClass compType = type.isArray() ? type.getOuterComponentType().asBoxed() : type.asBoxed();
   if (!(compType.isAbstract() || compType.isInterface() || compType.isEnum()) && !definitionsFactory.isExposedClass(compType)) {
    throw new InvalidMappingException("portable entity " + toMap.getFullyQualifiedName()
        + " contains a field (" + field.getName() + ") that is not known to the marshaller framework: "

代码示例来源:origin: org.jboss.errai/errai-marshalling

public static MappingDefinition map(final MetaClass toMap, final DefinitionsFactory definitionsFactory) {
 if ((toMap.isAbstract() && !toMap.isEnum()) || toMap.isInterface()) {
  throw new RuntimeException("cannot marshal an abstract class or interface: " + toMap.getFullyQualifiedName());
   final MetaClass compType = type.isArray() ? type.getOuterComponentType().asBoxed() : type.asBoxed();
   if (!(compType.isAbstract() || compType.isInterface() || compType.isEnum()) && !definitionsFactory.isExposedClass(compType)) {
    throw new InvalidMappingException("portable entity " + toMap.getFullyQualifiedName()
        + " contains a field (" + field.getName() + ") that is not known to the marshaller framework: "

代码示例来源:origin: org.jboss.errai/errai-codegen

buildMetaClass.setAbstract(clazz.isAbstract());
buildMetaClass.setFinal(clazz.isFinal());
buildMetaClass.setStatic(clazz.isStatic());

代码示例来源:origin: errai/errai

buildMetaClass.setAbstract(clazz.isAbstract());
buildMetaClass.setFinal(clazz.isFinal());
buildMetaClass.setStatic(clazz.isStatic());

代码示例来源:origin: errai/errai

loadVariable(targetVar).invoke(readMethod)));
if ((type.isInterface() || type.isAbstract()) &&
    (type.isAssignableTo(List.class) || type.isAssignableTo(Set.class))) {
 final MetaClass clazz = (type.isAssignableTo(Set.class))
 if (!type.isInterface() && !type.isAbstract()) {
  colBlock.append(Stmt.declareFinalVariable(colVarName, type.getErased(), Stmt.newObject(type.getErased())));

代码示例来源:origin: org.jboss.errai/errai-data-binding

loadVariable(targetVar).invoke(readMethod)));
if ((type.isInterface() || type.isAbstract()) &&
    (type.isAssignableTo(List.class) || type.isAssignableTo(Set.class))) {
 final MetaClass clazz = (type.isAssignableTo(Set.class))
 if (!type.isInterface() && !type.isAbstract()) {
  colBlock.append(Stmt.declareFinalVariable(colVarName, type.getErased(), Stmt.newObject(type.getErased())));

代码示例来源:origin: errai/errai

targetType.isArray() ? targetType.getOuterComponentType().asBoxed() : targetType.asBoxed();
if (!(compType.isAbstract() || compType.isInterface() || compType.isEnum())
  && !context.canMarshal(compType.getFullyQualifiedName())) {
 throw new NoAvailableMarshallerException(compType.getFullyQualifiedName());

代码示例来源:origin: org.jboss.errai/errai-marshalling

targetType.isArray() ? targetType.getOuterComponentType().asBoxed() : targetType.asBoxed();
if (!(compType.isAbstract() || compType.isInterface() || compType.isEnum())
  && !context.canMarshal(compType.getFullyQualifiedName())) {
 throw new NoAvailableMarshallerException(compType.getFullyQualifiedName());

相关文章