org.babyfish.collection.XOrderedMap.put()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(87)

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

XOrderedMap.put介绍

暂无

代码示例

代码示例来源:origin: babyfish-ct/babyfish

private void registerSelfStackTopInsnNode() {
  List<Object> stack = this.stack;
  if (stack != null && 
      !stack.isEmpty() && 
      stack.get(stack.size() - 1).equals(this.metadataClass.getInternalName())) {
    this.selfWillBeStackTopInsnMap.put(
        ((MethodNode)this.mv).instructions.getLast(), 
        stack.size()
    );
  }
}

代码示例来源:origin: babyfish-ct/babyfish

private void includeImpl(SingularAttribute<? super T, ?> valueAttribute, XOrderedSet<?> values) {
  if (Nulls.isNullOrEmpty(values)) {
    return;
  }
  XOrderedMap<SingularAttribute<? super T, ?>, XOrderedSet<?>> includeMap = this.includeMap;
  if (includeMap == null) {
    this.includeMap = includeMap = new LinkedHashMap<>();
  }
  includeMap.put(valueAttribute, values);
}

代码示例来源:origin: babyfish-ct/babyfish

private void excludeImpl(SingularAttribute<? super T, ?> valueAttribute, XOrderedSet<?> values) {
  if (Nulls.isNullOrEmpty(values)) {
    return;
  }
  XOrderedMap<SingularAttribute<? super T, ?>, XOrderedSet<?>> excludeMap = this.excludeMap;
  if (excludeMap == null) {
    this.excludeMap = excludeMap = new LinkedHashMap<>();
  }
  excludeMap.put(valueAttribute, values);
}

代码示例来源:origin: babyfish-ct/babyfish

ClassEntry(ClassNode classNode) {
  this.classNode = classNode;
  XOrderedMap<String, FieldEntry> fieldEntries = new LinkedHashMap<String, FieldEntry>();
  for (FieldNode fieldNode : (List<FieldNode>)classNode.fields) {
    fieldEntries.put(fieldNode.name, new FieldEntry(this, fieldNode));
  }
  this.fieldEntries = fieldEntries;
  XOrderedMap<Descriptor, MethodEntry> methodEntries = new LinkedHashMap<Descriptor, MethodEntry>();
  for (MethodNode methodNode : (List<MethodNode>)classNode.methods) {
    MethodEntry methodEntry = new MethodEntry(this, methodNode);
    methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  }
  this.methodEntries = methodEntries;
}

代码示例来源:origin: babyfish-ct/babyfish

!isSystemClass(clazz);
  clazz = clazz.getSuperclass()) {
classEntries.put(
    clazz.getName().replace('.', '/'), 
    new ClassEntry(clazz));

代码示例来源:origin: babyfish-ct/babyfish

public PathPlanKeyBuilder setQueryPaths(String alias, Collection<? extends QueryPath> queryPaths) {
  if (queryPaths == null || queryPaths.isEmpty()) {
    this.queryPathMap.remove(alias);
  }
  XOrderedSet<QueryPath> set = new LinkedHashSet<>((queryPaths.size() * 4 + 2) / 3);
  for (QueryPath queryPath : queryPaths) {
    if (queryPath != null) {
      set.add(QueryPaths.toStandard(queryPath));
    }
  }
  this.queryPathMap.put(alias, queryPaths.toArray(new QueryPath[set.size()]));
  this.key = null;
  return this;
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public void visitPath(Path<?> path) {
  if (path instanceof MapKeyPath<?>) {
    this.visit(path.getParentPath());
  } else {
    PathId pathId = QueryContext.this.pathIdAllocator.allocate();
    if (pathId.getPath() != path) {
      throw new AssertionError();
    }
    this.pathNodeImpls.put(pathId, null);
  }
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public void visitParameterExpression(ParameterExpression<?> parameterExpression) {
  if (parameterExpression.getName() == null) {
    ParameterExpressionImpl<?> parameterExpressionImpl = (ParameterExpressionImpl<?>)parameterExpression;
    if (!parameterExpressionImpl.setPosition(++this.parameterPositionSequence)) {
      throw new IllegalProgramException(unnamedParameterCanNotBeUsedTwice());
    }
    this.unnamedParameters.add(parameterExpression);
  } else {
    this.namedParameters.put(parameterExpression.getName(), parameterExpression);
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public void addAttribute(Attribute attribute) {
  if (attribute != null) {
    Arguments.mustNotBeNull("attribute.quanifiedName", attribute.getQuanifiedName());
    this.attributes.put(attribute.getQuanifiedName(), attribute);
  }
}

代码示例来源:origin: babyfish-ct/babyfish

this.classNode = classNode;
for (FieldNode fieldNode : (List<FieldNode>)classNode.fields) {
  fieldEntries.put(fieldNode.name, new FieldEntry(this, fieldNode));
  methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  fieldEntries.put(field.getName(), new FieldEntry(this, field));
  methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  methodEntries.put(methodEntry.getDescriptor(), methodEntry);

代码示例来源:origin: babyfish-ct/babyfish

if (property instanceof MetadataScalar) {
  MetadataScalar scalar = (MetadataScalar)property;
  properties.put(scalar.getName(), scalar);
  scalars.put(scalar.getName(), scalar);
} else if (property instanceof MetadataAssociation) {
  MetadataAssociation association = (MetadataAssociation)property;
  properties.put(association.getName(), association);
  associations.put(association.getName(), association);
if (property instanceof MetadataScalar) {
  MetadataScalar scalar = (MetadataScalar)property;
  properties.put(scalar.getName(), scalar);
  scalars.put(scalar.getName(), scalar);
} else if (property instanceof MetadataAssociation) {
  MetadataAssociation association = (MetadataAssociation)property;
  properties.put(association.getName(), association);
  associations.put(association.getName(), association);

代码示例来源:origin: babyfish-ct/babyfish

map.put(fieldNode.name, new JPAMetadataPropertyImpl(this, fieldNode));

代码示例来源:origin: babyfish-ct/babyfish

LEVEL_TWO_CACHE.pollFirstEntry();
LEVEL_TWO_CACHE.put(queryPath, compileResult);

代码示例来源:origin: babyfish-ct/babyfish

for (int i = 0; i < catches.length; i++) {
  for (String exceptionInternalName : catches[i].getExceptionInternalNames()) {
    catchLabels.put(exceptionInternalName, new Label());
    catchActions.put(exceptionInternalName, catches[i].getMvAction());

代码示例来源:origin: babyfish-ct/babyfish

protected LiteralParameter getLiteralParameter(Object object) {
  XOrderedMap<Object, LiteralParameter> literalParameters = this.literalParameters;
  if (literalParameters == null) {
    this.literalParameters = literalParameters = new LinkedHashMap<>();
  }
  LiteralParameter literalParameter = literalParameters.get(object);
  if (literalParameter == null) {
    if (object instanceof LiteralExpression<?>) {
      literalParameter = new LiteralParameter(literalParameters.size(), 
          ((LiteralExpression<?>)object).getValue());
    } else if (object instanceof Partition<?>) {
      Collection<Object> c = new ArrayList<>();
      for (Expression<?> value : ((Partition<?>)object).getValues()) {
        if (value instanceof LiteralExpression<?>) {
          c.add(((LiteralExpression<?>)value).getValue());
        } else {
          c.add(((ConstantExpression<?>)value).getValue());
        }
      }
      literalParameter = new LiteralParameter(literalParameters.size(), c);
    } else {
      Arguments.mustBeInstanceOfAnyOfValue("object", object, LiteralExpression.class, Partition.class);
    }
    literalParameters.put(object, literalParameter);
  }
  return literalParameter;
}

代码示例来源:origin: babyfish-ct/babyfish

public void resolveProperties() {
  if (this.properties != null) {
    return;
  }
  if (this.superClass == null) {
    this.properties = this.declaredProperties;
    return;
  }
  this.superClass.resolveProperties();
  if (this.declaredProperties.isEmpty()) {
    this.properties = this.superClass.properties;
    return;
  }
  XOrderedMap<String, JPAMetadataPropertyImpl> map = new LinkedHashMap<>(this.superClass.properties);
  for (JPAMetadataPropertyImpl property : this.declaredProperties.values()) {
    MetadataProperty superProperty = map.put(property.getName(), property);
    if (superProperty != null && !superProperty.getName().equals(property.unresolved.contravarianceFrom)) {
      throw new IllegalClassException(
          missContravarinaceWithSameName(
              property,
              superProperty,
              Contravariance.class,
              property.getName()
          )
      );
    }
  }
  this.properties = MACollections.unmodifiable(map);
}

代码示例来源:origin: babyfish-ct/babyfish

MetadataProperty superProperty = map.put(property.getName(), property);
if (superProperty != null && !superProperty.getName().equals(property.unresolved.contravarianceFrom)) {
  if (property.getPropertyType() != PropertyType.CONTRAVARIANCE) {

代码示例来源:origin: babyfish-ct/babyfish

newClassEntry.superClassEntry = this.classEntries.lastEntry().getValue();
this.newClassEntry = newClassEntry;
this.classEntries.put(newClassNode.name, newClassEntry);
return retval;

代码示例来源:origin: babyfish-ct/babyfish

public void init() {
  this.modelType = ASMTreeUtils.getAnnotationEnumValue(
      ModelType.class,
      ASMTreeUtils.getAnnotationNode(this.unresolved.classNode, Model.class),
      "type", 
      ModelType.REFERENCE);
  
  XOrderedMap<String, MetadataPropertyImpl> map = new LinkedHashMap<>();
  if (this.unresolved.classNode.fields != null) {
    for (FieldNode fieldNode : this.unresolved.classNode.fields) {
      if (ASMTreeUtils.getAnnotationNode(fieldNode, Scalar.class) != null ||
          ASMTreeUtils.getAnnotationNode(fieldNode, Association.class) != null ||
          ASMTreeUtils.getAnnotationNode(fieldNode, IndexOf.class) != null ||
          ASMTreeUtils.getAnnotationNode(fieldNode, KeyOf.class) != null ||
          ASMTreeUtils.getAnnotationNode(fieldNode, Contravariance.class) != null) {
        MetadataPropertyImpl metadataProperty = new MetadataPropertyImpl(this, fieldNode);
        map.put(fieldNode.name, metadataProperty);
      }
    }
  }
  this.declaredProperties = MACollections.unmodifiable(map);
}

代码示例来源:origin: babyfish-ct/babyfish

allEntityMap.put(fromElementAlias, index);

相关文章