Interface Named
-
- All Known Subinterfaces:
BusinessDayConvention
,CdsConvention
,CurveExtrapolator
,CurveInterpolator
,DateSequence
,DayCount
,FixedFloatSwapConvention
,FixedIborSwapConvention
,FixedInflationSwapConvention
,FixedOvernightSwapConvention
,FloatingRate
,FloatingRateIndex
,FloatingRateName
,FpmlParserPlugin
,FraConvention
,FxIndex
,FxSwapConvention
,HolidayCalendar
,IborFixingDepositConvention
,IborFutureContractSpec
,IborFutureConvention
,IborIborSwapConvention
,IborIndex
,Index
,Measure
,NamedEnum
,OvernightFutureContractSpec
,OvernightIborSwapConvention
,OvernightIndex
,PeriodAdditionConvention
,PositionCsvParserPlugin
,PriceIndex
,RateIndex
,RollConvention
,SingleCurrencySwapConvention
,SwapIndex
,TermDepositConvention
,ThreeLegBasisSwapConvention
,TradeCsvParserPlugin
,TradeCsvWriterPlugin<T>
,WeightingFunction
,XCcyIborIborSwapConvention
- All Known Implementing Classes:
AccrualOnDefaultFormula
,AccrualStart
,ArbitrageHandling
,AsciiTableAlignment
,AttributeType
,BarrierType
,BillYieldConvention
,BondFutureVolatilitiesName
,BondVolatilitiesName
,BuySell
,ByteSourceCodec
,CapFloor
,CapitalIndexedBondYieldConvention
,CashSwaptionSettlementMethod
,CcpId
,CdsQuoteConvention
,CmsPeriodType
,ColumnName
,CompoundedRateType
,CompoundingMethod
,CurveGroupName
,CurveInfoType
,CurveName
,CurveNodeClashAction
,CurveNodeDateType
,CurveSensitivitiesType
,EtdContractCode
,EtdContractGroupCode
,EtdExpiryType
,EtdOptionType
,EtdSettlementType
,EtdType
,ExchangeId
,ExplainKey
,FailureReason
,FieldName
,FixedAccrualMethod
,FixedCouponBondYieldConvention
,FixingRelativeTo
,FloatingRateType
,FraDiscountingMethod
,FutureOptionPremiumStyle
,FxNdfTradeCsvPlugin
,FxOptionVolatilitiesName
,FxResetFixingRelativeTo
,FxSingleBarrierOptionMethod
,FxSingleBarrierOptionTradeCsvPlugin
,FxVanillaOptionMethod
,GenericSecurityTradeCsvPlugin
,HolidayCalendarId
,IborCapFloorTradeCsvPlugin
,IborCapletFloorletVolatilitiesName
,IborFutureOptionVolatilitiesName
,IborRateResetMethod
,ImmutableCdsConvention
,ImmutableFixedIborSwapConvention
,ImmutableFixedInflationSwapConvention
,ImmutableFixedOvernightSwapConvention
,ImmutableFloatingRateName
,ImmutableFraConvention
,ImmutableFxIndex
,ImmutableFxSwapConvention
,ImmutableHolidayCalendar
,ImmutableIborFixingDepositConvention
,ImmutableIborFutureContractSpec
,ImmutableIborFutureConvention
,ImmutableIborIborSwapConvention
,ImmutableIborIndex
,ImmutableMeasure
,ImmutableOvernightFutureContractSpec
,ImmutableOvernightIborSwapConvention
,ImmutableOvernightIndex
,ImmutablePriceIndex
,ImmutableSwapIndex
,ImmutableTermDepositConvention
,ImmutableThreeLegBasisSwapConvention
,ImmutableXCcyIborIborSwapConvention
,KnockType
,LegalEntityGroup
,LongShort
,MarketDataName
,MoneynessType
,NegativeRateMethod
,ObservableSource
,OvernightAccrualMethod
,PaymentOnDefault
,PaymentRelativeTo
,PayReceive
,PortfolioItemType
,PriceIndexCalculationMethod
,PriceType
,ProductType
,ProtectionStartOfDay
,PutCall
,RepoGroup
,ReportingCurrencyType
,SabrParameterType
,SecurityTradeCsvPlugin
,SettlementType
,ShiftType
,StrikeType
,StubConvention
,SurfaceInfoType
,SurfaceName
,SwapLegType
,SwaptionVolatilitiesName
,TypedString
,ValueAdjustmentType
,ValueType
public interface Named
A named instance.This simple interface is used to define objects that can be identified by a unique name. The name contains enough information to be able to recreate the instance.
Implementations should provide a static method
of(String)
that allows the instance to be created from the name.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getName()
Gets the unique name of the instance.static <T extends Named>
Tof(Class<T> type, String name)
Obtains an instance of the specified named type by name.
-
-
-
Method Detail
-
of
static <T extends Named> T of(Class<T> type, String name)
Obtains an instance of the specified named type by name.This method operates by reflection. It requires a static method
of(String)
method to be present on the type specified. If the method does not exist an exception is thrown.- Type Parameters:
T
- the named type- Parameters:
type
- the named type with theof(String)
methodname
- the name to find- Returns:
- the instance of the named type
- Throws:
IllegalArgumentException
- if the specified name could not be found
-
getName
String getName()
Gets the unique name of the instance.The name contains enough information to be able to recreate the instance.
- Returns:
- the unique name
-
-