public ValueCompositeTemplateModel( ValueComposite composite, ObjectWrapper wrapper ) { this.composite = composite; this.wrapper = wrapper; descriptor = (ValueDescriptor) Qi4j.FUNCTION_DESCRIPTOR_FOR.map( composite ); }
public static Iterable<Type> typesOf( Type type ) { return TYPES_OF.map( type ); }
public static Iterable<Type> interfacesOf( Type type ) { return INTERFACES_OF.map( type ); }
@Override public boolean satisfiedBy( Type item ) { return Classes.RAW_CLASS.map( item ).getDeclaredMethods().length > 0; } };
public static boolean isMap( Type type ) { Class<?> cl = Classes.RAW_CLASS.map( type ); return Map.class.isAssignableFrom( cl ); }
@Override public String map( Type type ) { return RAW_CLASS.map( type ).getName(); } };
public static boolean isCollection( Type type ) { Class<?> cl = Classes.RAW_CLASS.map( type ); return cl.equals( Collection.class ) || cl.equals( List.class ) || cl.equals( Set.class ); }
public ConstraintViolationException( String instanceToString, Iterable<Class<?>> instanceTypes, Member method, Collection<ConstraintViolation> violations ) { this.instanceToString = instanceToString; this.instanceTypes = instanceTypes; mixinTypeName = method.getDeclaringClass().getName(); methodName = method.getName(); this.constraintViolations = violations; }
@Override public Iterable<Method> map( Type type ) { return iterable( Classes.RAW_CLASS.map( type ).getDeclaredMethods() ); } } );
@Override public Iterable<Annotation> map( Type type ) { return Iterables.iterable( Classes.RAW_CLASS.map( type ).getAnnotations() ); } } );
public static TypeName nameOf( Type type ) { return nameOf( Classes.RAW_CLASS.map( type ) ); }
private String getCompositeName( Composite composite ) { return first( Qi4j.FUNCTION_DESCRIPTOR_FOR.map( composite ).types()).getName(); } }
@Override public Iterable<T> map( Type type ) { return flattenIterables( Iterables.map( function, TYPES_OF.map( type ) ) ); } };
@Override @SuppressWarnings( "unchecked" ) public Object map( Composite composite, Type type, String value ) { return Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.map( composite ).module().newValueFromSerializedState( (Class<Object>) type, value ); } }
@Override public Iterable<T> map( Type type ) { return flattenIterables( Iterables.map( function, CLASS_HIERARCHY.map( type ) ) ); } };
public SimpleLogConcern( @This Composite composite ) { this.composite = composite; Class<?> type = first( Qi4j.FUNCTION_DESCRIPTOR_FOR.map( composite ).types() ); category = type.getName(); }
public static Specification<DomainEventValue> withNames( final Class eventClass ) { return Events.withNames( map( new Function<Method, String>() { @Override public String map( Method method ) { return method.getName(); } }, Iterables.toList( Methods.METHODS_OF.map( eventClass ) ) )); }
public static Specification<ApplicationEvent> withNames( final Class eventClass ) { return ApplicationEvents.withNames( Iterables.map( new Function<Method, String>() { @Override public String map( Method method ) { return method.getName(); } }, Iterables.toList( Methods.METHODS_OF.map( eventClass ) ) )); }
@Override public <T> T create( Class<T> entityType, Object value, Function<T, T> prototypeOpportunity ) { EntityBuilder<?> builder = doConversion( entityType, null, value ); prototypeOpportunity.map( (T) builder.instance() ); return createInstance( builder ); }
@Override @SuppressWarnings( "unchecked" ) public <T> T convert( final Class<T> valueType, Object entity, Function<T, T> prototypeOpportunity ) { ValueBuilder<?> builder = doConversion( valueType, entity ); prototypeOpportunity.map( (T) builder.prototype() ); return createInstance( builder ); }