Map originator type.

@param originatorType the originator type
@return the originator
426150
private static Originator mapOriginatorType(OriginatorType originatorType) {
        Originator originator = new Originator();
        if (originatorType != null) {
            originator.setCustomId(originatorType.getCustomId());
            originator.setHostname(originatorType.getHostname());
            originator.setIp(originatorType.getIp());
            originator.setProcessId(originatorType.getProcessId());
            originator.setPrincipal(originatorType.getPrincipal());
        }
        return originator;
    }
607670
public <T extends Mapping> T getMapping(MappingType type)
    {
        return (T) mappings.get(type);
    }
579116
private void createProxies() {
    source = createProxy(sourceType);
    destination = createProxy(destinationType);

    for (VisitedMapping mapping : visitedMappings) {
      createAccessorProxies(source, mapping.sourceAccessors);
      createAccessorProxies(destination, mapping.destinationAccessors);
    }
  }
621654
private <T> Instantiator<T> getByDefaultConstructor(TypeToken<T> type) {
    try {
      final Constructor<? super T> defaultCons = type.getRawType().getDeclaredConstructor();
      defaultCons.setAccessible(true);

      return new Instantiator<T>() {
        @Override
        public T create() {
          try {
            return (T) defaultCons.newInstance();
          } catch (Exception e) {
            throw Throwables.propagate(e);
          }
        }
      };

    } catch (NoSuchMethodException e) {
      return null;
    }
  }
1165942
public Optional<MapperInstance> getSerializer( JType type ) {
        return Optional.fromNullable( serializers.get( type.getQualifiedSourceName() ) );
    }
344858
public FilterMappingType<WebAppType<T>> getOrCreateFilterMapping()
   {
      List<Node> nodeList = childNode.get("filter-mapping");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterMappingTypeImpl<WebAppType<T>>(this, "filter-mapping", childNode, nodeList.get(0));
      }
      return createFilterMapping();
   }
1186900
private <A extends Annotation> AnnotationConverter<A> getConverter(Annotation annotation) {
		MappingOption mappingOption = annotation.annotationType().getAnnotation( MappingOption.class );
		if ( mappingOption == null ) {
			return null;
		}

		// wrong type would be a programming error of the annotation developer
		@SuppressWarnings("unchecked")
		Class<? extends AnnotationConverter<A>> converterClass = (Class<? extends AnnotationConverter<A>>) mappingOption.value();

		try {
			return converterClass.newInstance();
		}
		catch (Exception e) {
			throw log.cannotConvertAnnotation( converterClass, e );
		}
	}
915488
@Internal
	public static <OUT> TypeInfoFactory<OUT> getTypeInfoFactory(Type t) {
		final Class<?> factoryClass;
		if (registeredTypeInfoFactories.containsKey(t)) {
			factoryClass = registeredTypeInfoFactories.get(t);
		}
		else {
			if (!isClassType(t) || !typeToClass(t).isAnnotationPresent(TypeInfo.class)) {
				return null;
			}
			final TypeInfo typeInfoAnnotation = typeToClass(t).getAnnotation(TypeInfo.class);
			factoryClass = typeInfoAnnotation.value();
			// check for valid factory class
			if (!TypeInfoFactory.class.isAssignableFrom(factoryClass)) {
				throw new InvalidTypesException("TypeInfo annotation does not specify a valid TypeInfoFactory.");
			}
		}

		// instantiate
		return (TypeInfoFactory<OUT>) InstantiationUtil.instantiate(factoryClass);
	}
316886
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) {
        return new AnnotationTypeMatcher<T>(matcher);
    }
1328555
public Optional<MapperInstance> getKeyDeserializer( JType type ) {
        return Optional.fromNullable( keyDeserializers.get( type.getQualifiedSourceName() ) );
    }
259275
public Optional<MapperInstance> getKeySerializer( JType type ) {
        return Optional.fromNullable( keySerializers.get( type.getQualifiedSourceName() ) );
    }
48015
public static IdGenerator getIdGeneratorByType(GenerationType generationType) {
		if (generationType == null)
			return null;
		switch (generationType) {
		case IDENTITY:
			return IdentityIdGenerator.INSTANCE;
		case AUTO:
			return AutoIdGenerator.INSTANCE;
		case UUID25:
			return UUID25Generator.INSTANCE;
		case UUID32:
			return UUID32Generator.INSTANCE;
		case UUID36:
			return UUID36Generator.INSTANCE;
		case TIMESTAMP:
			return TimeStampIdGenerator.INSTANCE;
		case SNOWFLAKE:
			return SnowflakeGenerator.INSTANCE;
		default:
			return null;
		}
	}
69536
@SuppressWarnings("unchecked")
	public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
		return (this.method != null ? this.method.getAnnotation(annotationType) :
				(T) this.constructor.getAnnotation(annotationType));
	}
133157
@SuppressWarnings("unchecked")
  public <S, D> TypeMap<S, D> get(Class<S> sourceType, Class<D> destinationType, String typeMapName) {
    TypeMap<S, D> typeMap = (TypeMap<S, D>) typeMaps.get(TypePair.of(sourceType, destinationType, typeMapName));
    if (typeMap != null)
      return typeMap;

    for (TypePair<?, ?> typePair : getPrimitiveWrapperTypePairs(sourceType, destinationType, typeMapName)) {
      typeMap = (TypeMap<S, D>) typeMaps.get(typePair);
      if (typeMap != null)
        return typeMap;
    }

    return null;
  }
574525
public final void setOriginator (SIBUuid8 value) {
    if (value != null) {
      byte[] a = value.toByteArray();
      getPayload().setField(TrmAccess.BODY_ROUTEDATA_ORIGINATOR, a);
    } else {
      getPayload().setField(TrmAccess.BODY_ROUTEDATA_ORIGINATOR, null);
    }
  }
80743
public Converter<EntityMappings<T>> getOrCreateConverter()
   {
      List<Node> nodeList = childNode.get("converter");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ConverterImpl<EntityMappings<T>>(this, "converter", childNode, nodeList.get(0));
      }
      return createConverter();
   }
333510
public com.sun.javadoc.Type overriddenType() {

        if ((sym.flags() & Flags.STATIC) != 0) {
            return null;
        }

        ClassSymbol origin = (ClassSymbol)sym.owner;
        for (Type t = env.types.supertype(origin.type);
             t.hasTag(CLASS);
             t = env.types.supertype(t)) {
            ClassSymbol c = (ClassSymbol)t.tsym;
            for (Scope.Entry e = membersOf(c).lookup(sym.name); e.scope != null; e = e.next()) {
                if (sym.overrides(e.sym, origin, env.types, true)) {
                    return TypeMaker.getType(env, t);
                }
            }
        }
        return null;
    }