001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 */ 011package org.apache.juneau.commons.inject; 012 013/** 014 * Predicate hook used by {@link Conditional}. 015 */ 016public interface Condition { 017 018 /** 019 * Returns <jk>true</jk> when the target should be registered. 020 * 021 * @param ctx The condition context. 022 * @return <jk>true</jk> if the condition matches. 023 */ 024 boolean matches(ConditionContext ctx); 025} 026