MetaProperty.name
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.joda.beans.MetaProperty.name(Showing top 15 results out of 315)

origin: OpenGamma/Strata

@Override
public BeanBuilder<DoubleArray> set(String propertyName, Object value) {
 if (propertyName.equals(ARRAY.name())) {
  this.array = ((double[]) ArgChecker.notNull(value, "value")).clone();
 } else {
  throw new NoSuchElementException("Unknown property: " + propertyName);
 }
 return this;
}
origin: org.joda/joda-beans

@Override
@SuppressWarnings("unchecked")
public <P> P get(MetaProperty<P> metaProperty) {
  // this approach allows meta-property from one bean to be used with another
  return (P) bean.get(metaProperty.name());
}
origin: OpenGamma/Strata

public void test_builder() {
 assertThrowsIllegalArg(() -> DiscountFxForwardRates.meta().builder()
   .set(DiscountFxForwardRates.meta().currencyPair(), CurrencyPair.parse("GBP/USD")).build());
 assertThrowsIllegalArg(() -> DiscountFxForwardRates.meta().builder()
   .set(DiscountFxForwardRates.meta().currencyPair().name(), CurrencyPair.parse("GBP/USD")).build());
}
origin: org.joda/joda-beans

@Override
public boolean equals(Object obj) {
  if (obj instanceof MetaProperty<?>) {
    MetaProperty<?> other = (MetaProperty<?>) obj;
    return name().equals(other.name()) && declaringType().equals(other.declaringType());
  }
  return false;
}
origin: OpenGamma/Strata

public void coverage_builder() {
 Meta meta = FxRateId.meta();
 FxRateId test1 = meta.builder()
   .set(meta.pair(), CurrencyPair.parse("EUR/GBP"))
   .set(meta.observableSource(), OBS_SOURCE)
   .build();
 FxRateId test2 = meta.builder()
   .set(meta.pair().name(), CurrencyPair.parse("EUR/GBP"))
   .set(meta.observableSource(), OBS_SOURCE)
   .build();
 coverBeanEquals(test1, test2);
}
origin: org.joda/joda-beans

@Override
@SuppressWarnings("unchecked")
public <P> P get(MetaProperty<P> metaProperty) {
  return (P) get(metaProperty.name());
}
origin: OpenGamma/Strata

@Override
public BeanBuilder<IntArray> set(String propertyName, Object value) {
 if (propertyName.equals(ARRAY.name())) {
  this.array = ((int[]) ArgChecker.notNull(value, "value")).clone();
 } else {
  throw new NoSuchElementException("Unknown property: " + propertyName);
 }
 return this;
}
origin: org.joda/joda-beans

@Override
public BeanBuilder<T> set(MetaProperty<?> metaProperty, Object value) {
  set(metaProperty.name(), value);
  return this;
}
origin: OpenGamma/Strata

@Override
public Object get(String propertyName) {
 if (propertyName.equals(ARRAY.name())) {
  return array.clone();
 } else {
  throw new NoSuchElementException("Unknown property: " + propertyName);
 }
}
origin: org.joda/joda-beans

@Override
public boolean containsValue(Object value) {
  return value instanceof MetaProperty &&
      metaBean.metaPropertyGet(((MetaProperty<?>) value).name()) != null;
}
origin: org.joda/joda-beans

@Override
@SuppressWarnings("unchecked")
public <P> P get(MetaProperty<P> metaProperty) {
  return (P) get(metaProperty.name());
}
origin: org.joda/joda-beans

@Override
public FlexiBeanBuilder set(MetaProperty<?> metaProperty, Object value) {
  // this approach allows meta-property from one bean to be used with another
  bean.put(metaProperty.name(), value);
  return this;
}
origin: org.joda/joda-beans

@Override
@SuppressWarnings("unchecked")
public <P> P get(MetaProperty<P> metaProperty) {
  return (P) get(metaProperty.name());
}
origin: org.joda/joda-beans

@Override
public BeanBuilder<T> set(MetaProperty<?> metaProperty, Object value) {
  try {
    set(metaProperty.name(), value);
    return this;
  } catch (RuntimeException ex) {
    if (value == JodaBeanTests.TEST_COVERAGE_STRING) {
      return this;
    }
    throw ex;
  }
}
origin: org.joda/joda-beans

@Override
public MapBeanBuilder set(MetaProperty<?> metaProperty, Object value) {
  // this approach allows meta-property from one bean to be used with another
  bean.put(metaProperty.name(), value);
  return this;
}
org.joda.beansMetaPropertyname

Javadoc

Gets the property name.

The JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.

Popular methods of MetaProperty

  • get
    Gets the value of the property for the specified bean. For a standard JavaBean, this is equivalent t
  • annotations
    Gets the annotations of the property. The annotations are queried from the property. This is typical
  • createProperty
    Creates a property that binds this meta-property to a specific bean. This method returns a Property
  • propertyGenericType
    Gets the generic types of the property. This provides access to the generic type declared in the sou
  • propertyType
    Get the type of the property represented as a Class. This is the type of the property. For example,
  • declaringType
    Get the type that declares the property, represented as a Class. This is the type of the bean where
  • equals
    Checks if this meta-property equals another. This compares the property name and declaring type. It
  • getString
    Gets the value of the property for the specified bean converted to a string. This converts the resu
  • hashCode
    Returns a suitable hash code.
  • metaBean
    Gets the meta-bean which owns this meta-property. Each meta-property is fully owned by a single bean
  • put
    Sets the value of the property on the associated bean and returns the previous value. The value must
  • set
    Sets the value of the property on the specified bean. The value must be of the correct type for the
  • put,
  • set,
  • setString,
  • style

Popular classes and methods

  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • LinkedHashMap (java.util)
    Hash table implementation of the Map interface with predictable iteration order. [Sun docs] [http:/
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JOptionPane (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)