ComputationTargetSpecification extends ComputationTargetReference { public static ComputationTargetSpecification of(final PortfolioNode portfolioNode) { return ComputationTargetType.PORTFOLIO_NODE.specification(portfolioNode); } ComputationTargetSpecification(final ComputationTargetType targetType, final UniqueId uid);  ComputationTargetSpecification(final ComputationTargetType type, final UniqueId uid, final ComputationTargetReference parent);  ComputationTargetSpecification(final ComputationTargetReference parent, final ComputationTargetType type, final UniqueId uid); static ComputationTargetSpecification of(final PortfolioNode portfolioNode); static ComputationTargetSpecification of(final Position position); static ComputationTargetSpecification of(final Security security); static ComputationTargetSpecification of(final Trade trade); static ComputationTargetSpecification of(final Currency currency); static ComputationTargetSpecification of(final CreditCurveIdentifier creditCurveIdentifier); static ComputationTargetSpecification of(final UniqueId uniqueId); UniqueId getUniqueId(); boolean isCompatible(final ComputationTargetSpecification other); @Override ComputationTargetSpecification getSpecification(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); @Override T accept(final ComputationTargetReferenceVisitor<T> visitor); static final ComputationTargetSpecification NULL; }
@Test(expectedExceptions = IllegalArgumentException.class) public void test_constructor_Type_UniqueId_nullType_validId() { new ComputationTargetSpecification(ComputationTargetType.NULL, UniqueId.of("Foo", "Bar")); }
@Test(expectedExceptions = {IllegalStateException.class }) public void test_getRequirement() { final ComputationTargetReference a = ComputationTargetSpecification.of(SECURITY); a.getRequirement(); }