public JobExecution(Job job, Configuration configuration, WorkflowInstanceImpl workflowInstance) { this.job = job; this.workflowInstance = workflowInstance; this.time = Time.now(); this.configuration = configuration; }
public static Method findMethod(Class<?> clazz, String methodName) { return findMethod(clazz, methodName, null); }
public String toString() { return Reflection.getSimpleName(field)+"->"+jsonTypeMapper; } }
/** Adds an uninitialized component to the brewery * under the given name. * @throws RuntimeException if component is null * @throws RuntimeException if name is null */ public void ingredient(Object component, String name) { Exceptions.checkNotNullParameter(component, "component"); Exceptions.checkNotNullParameter(name, "name"); // log.debug("ingredient("+ingredient+")-->"+name); ingredients.put(name, component); }
public static void checkNotNull(Object object) { checkNotNull(object, "expected a non-null value"); }
public TypeMapping(Type type) { this.type = type; this.rawClass = Reflection.getRawClass(type); }
public static void checkNotNull(Object object, String description) { checkTrue(object!=null, description); }
public Object instantiate() { return Reflection.instantiate(rawClass); }
private PolymorphicMapping getParameterizedPolymorphicMapping(Type type, PolymorphicMapping untypedPolymorphicMapping) { if (!Reflection.isParameterized(type)) { return untypedPolymorphicMapping; } throw new RuntimeException("TODO polymorphic, parameterized types are not yet supported"); }
public static List<Field> getNonStaticFieldsRecursive(Class< ? > type) { List<Field> fieldCollector = new ArrayList<>(); collectNonStaticFieldsRecursive(type, fieldCollector); return fieldCollector; }
public BindingMapper(TypeMapping typeMapping) { super(typeMapping); if (typeMapping.isParameterized()) { Type typeArg = Reflection.getTypeArg(typeMapping.getType(), 0); if (typeArg!=null && typeArg!=Object.class) { isParameterized = true; } } }
public ScopeInstanceImpl(ScopeInstanceImpl parent, ScopeImpl scope) { super(parent); this.scope = scope; this.start = Time.now(); }
/** Adds an alias so that a component with the * given name is also available as the given alias. * @throws RuntimeException if alias is null * @throws RuntimeException if name is null */ public void alias(String alias, String name) { Exceptions.checkNotNullParameter(alias, "alias"); Exceptions.checkNotNullParameter(name, "name"); if (!alias.equals(name)) { aliases.put(alias, name); } }
public String toString() { return "TypeMapping<"+Reflection.getSimpleName(type)+">"; }
public static void checkNotNullParameter(Object object, String argumentName) { checkNotNull(object, argumentName+" is null"); }
public static Type getSuperclass(Type type) { return getRawClass(type).getGenericSuperclass(); }
public boolean isDue() { return dueDate ==null || dueDate.compareTo(Time.now())<=0; }
public BeanMapper(TypeMapping typeMapping) { super(Reflection.getSimpleName(typeMapping.getType())); this.typeMapping = typeMapping; }
protected ScopeInstanceImpl getScopeInstance(WorkflowInstanceImpl workflowInstance, String activityInstanceId) { ScopeInstanceImpl scopeInstance = workflowInstance; if (activityInstanceId!=null) { scopeInstance = workflowInstance.findActivityInstance(activityInstanceId); Exceptions.checkNotNull(scopeInstance); } return scopeInstance; }