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

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

本文整理了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

  1. private void registerSelfStackTopInsnNode() {
  2. List<Object> stack = this.stack;
  3. if (stack != null &&
  4. !stack.isEmpty() &&
  5. stack.get(stack.size() - 1).equals(this.metadataClass.getInternalName())) {
  6. this.selfWillBeStackTopInsnMap.put(
  7. ((MethodNode)this.mv).instructions.getLast(),
  8. stack.size()
  9. );
  10. }
  11. }

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

  1. private void includeImpl(SingularAttribute<? super T, ?> valueAttribute, XOrderedSet<?> values) {
  2. if (Nulls.isNullOrEmpty(values)) {
  3. return;
  4. }
  5. XOrderedMap<SingularAttribute<? super T, ?>, XOrderedSet<?>> includeMap = this.includeMap;
  6. if (includeMap == null) {
  7. this.includeMap = includeMap = new LinkedHashMap<>();
  8. }
  9. includeMap.put(valueAttribute, values);
  10. }

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

  1. private void excludeImpl(SingularAttribute<? super T, ?> valueAttribute, XOrderedSet<?> values) {
  2. if (Nulls.isNullOrEmpty(values)) {
  3. return;
  4. }
  5. XOrderedMap<SingularAttribute<? super T, ?>, XOrderedSet<?>> excludeMap = this.excludeMap;
  6. if (excludeMap == null) {
  7. this.excludeMap = excludeMap = new LinkedHashMap<>();
  8. }
  9. excludeMap.put(valueAttribute, values);
  10. }

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

  1. ClassEntry(ClassNode classNode) {
  2. this.classNode = classNode;
  3. XOrderedMap<String, FieldEntry> fieldEntries = new LinkedHashMap<String, FieldEntry>();
  4. for (FieldNode fieldNode : (List<FieldNode>)classNode.fields) {
  5. fieldEntries.put(fieldNode.name, new FieldEntry(this, fieldNode));
  6. }
  7. this.fieldEntries = fieldEntries;
  8. XOrderedMap<Descriptor, MethodEntry> methodEntries = new LinkedHashMap<Descriptor, MethodEntry>();
  9. for (MethodNode methodNode : (List<MethodNode>)classNode.methods) {
  10. MethodEntry methodEntry = new MethodEntry(this, methodNode);
  11. methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  12. }
  13. this.methodEntries = methodEntries;
  14. }

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

  1. !isSystemClass(clazz);
  2. clazz = clazz.getSuperclass()) {
  3. classEntries.put(
  4. clazz.getName().replace('.', '/'),
  5. new ClassEntry(clazz));

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

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

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

  1. @Override
  2. public void visitPath(Path<?> path) {
  3. if (path instanceof MapKeyPath<?>) {
  4. this.visit(path.getParentPath());
  5. } else {
  6. PathId pathId = QueryContext.this.pathIdAllocator.allocate();
  7. if (pathId.getPath() != path) {
  8. throw new AssertionError();
  9. }
  10. this.pathNodeImpls.put(pathId, null);
  11. }
  12. }

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

  1. @Override
  2. public void visitParameterExpression(ParameterExpression<?> parameterExpression) {
  3. if (parameterExpression.getName() == null) {
  4. ParameterExpressionImpl<?> parameterExpressionImpl = (ParameterExpressionImpl<?>)parameterExpression;
  5. if (!parameterExpressionImpl.setPosition(++this.parameterPositionSequence)) {
  6. throw new IllegalProgramException(unnamedParameterCanNotBeUsedTwice());
  7. }
  8. this.unnamedParameters.add(parameterExpression);
  9. } else {
  10. this.namedParameters.put(parameterExpression.getName(), parameterExpression);
  11. }
  12. }

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

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

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

  1. this.classNode = classNode;
  2. for (FieldNode fieldNode : (List<FieldNode>)classNode.fields) {
  3. fieldEntries.put(fieldNode.name, new FieldEntry(this, fieldNode));
  4. methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  5. fieldEntries.put(field.getName(), new FieldEntry(this, field));
  6. methodEntries.put(methodEntry.getDescriptor(), methodEntry);
  7. methodEntries.put(methodEntry.getDescriptor(), methodEntry);

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

  1. if (property instanceof MetadataScalar) {
  2. MetadataScalar scalar = (MetadataScalar)property;
  3. properties.put(scalar.getName(), scalar);
  4. scalars.put(scalar.getName(), scalar);
  5. } else if (property instanceof MetadataAssociation) {
  6. MetadataAssociation association = (MetadataAssociation)property;
  7. properties.put(association.getName(), association);
  8. associations.put(association.getName(), association);
  9. if (property instanceof MetadataScalar) {
  10. MetadataScalar scalar = (MetadataScalar)property;
  11. properties.put(scalar.getName(), scalar);
  12. scalars.put(scalar.getName(), scalar);
  13. } else if (property instanceof MetadataAssociation) {
  14. MetadataAssociation association = (MetadataAssociation)property;
  15. properties.put(association.getName(), association);
  16. associations.put(association.getName(), association);

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

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

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

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

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

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

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

  1. protected LiteralParameter getLiteralParameter(Object object) {
  2. XOrderedMap<Object, LiteralParameter> literalParameters = this.literalParameters;
  3. if (literalParameters == null) {
  4. this.literalParameters = literalParameters = new LinkedHashMap<>();
  5. }
  6. LiteralParameter literalParameter = literalParameters.get(object);
  7. if (literalParameter == null) {
  8. if (object instanceof LiteralExpression<?>) {
  9. literalParameter = new LiteralParameter(literalParameters.size(),
  10. ((LiteralExpression<?>)object).getValue());
  11. } else if (object instanceof Partition<?>) {
  12. Collection<Object> c = new ArrayList<>();
  13. for (Expression<?> value : ((Partition<?>)object).getValues()) {
  14. if (value instanceof LiteralExpression<?>) {
  15. c.add(((LiteralExpression<?>)value).getValue());
  16. } else {
  17. c.add(((ConstantExpression<?>)value).getValue());
  18. }
  19. }
  20. literalParameter = new LiteralParameter(literalParameters.size(), c);
  21. } else {
  22. Arguments.mustBeInstanceOfAnyOfValue("object", object, LiteralExpression.class, Partition.class);
  23. }
  24. literalParameters.put(object, literalParameter);
  25. }
  26. return literalParameter;
  27. }

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

  1. public void resolveProperties() {
  2. if (this.properties != null) {
  3. return;
  4. }
  5. if (this.superClass == null) {
  6. this.properties = this.declaredProperties;
  7. return;
  8. }
  9. this.superClass.resolveProperties();
  10. if (this.declaredProperties.isEmpty()) {
  11. this.properties = this.superClass.properties;
  12. return;
  13. }
  14. XOrderedMap<String, JPAMetadataPropertyImpl> map = new LinkedHashMap<>(this.superClass.properties);
  15. for (JPAMetadataPropertyImpl property : this.declaredProperties.values()) {
  16. MetadataProperty superProperty = map.put(property.getName(), property);
  17. if (superProperty != null && !superProperty.getName().equals(property.unresolved.contravarianceFrom)) {
  18. throw new IllegalClassException(
  19. missContravarinaceWithSameName(
  20. property,
  21. superProperty,
  22. Contravariance.class,
  23. property.getName()
  24. )
  25. );
  26. }
  27. }
  28. this.properties = MACollections.unmodifiable(map);
  29. }

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

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

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

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

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

  1. public void init() {
  2. this.modelType = ASMTreeUtils.getAnnotationEnumValue(
  3. ModelType.class,
  4. ASMTreeUtils.getAnnotationNode(this.unresolved.classNode, Model.class),
  5. "type",
  6. ModelType.REFERENCE);
  7. XOrderedMap<String, MetadataPropertyImpl> map = new LinkedHashMap<>();
  8. if (this.unresolved.classNode.fields != null) {
  9. for (FieldNode fieldNode : this.unresolved.classNode.fields) {
  10. if (ASMTreeUtils.getAnnotationNode(fieldNode, Scalar.class) != null ||
  11. ASMTreeUtils.getAnnotationNode(fieldNode, Association.class) != null ||
  12. ASMTreeUtils.getAnnotationNode(fieldNode, IndexOf.class) != null ||
  13. ASMTreeUtils.getAnnotationNode(fieldNode, KeyOf.class) != null ||
  14. ASMTreeUtils.getAnnotationNode(fieldNode, Contravariance.class) != null) {
  15. MetadataPropertyImpl metadataProperty = new MetadataPropertyImpl(this, fieldNode);
  16. map.put(fieldNode.name, metadataProperty);
  17. }
  18. }
  19. }
  20. this.declaredProperties = MACollections.unmodifiable(map);
  21. }

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

  1. allEntityMap.put(fromElementAlias, index);

相关文章