Just define a FilterDef with the parameters the filter condition will receive:
@FilterDef(name = "smithFilter", parameters = {@ParamDef(name = "lastName", type = "string")})
@Filter(name="smithFilter", condition="LAST_NAME = :lastName")
As you also used the word "programmatically", you may also want to know that you can set the parameter based on other inputs, like this:
session.enableFilter("smithFilter").setParameter("lastName", "SMITH");
More details in Hibernate documentation:
http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#objectstate-filters