Tabnine Logo
PropertyKey
Code IndexAdd Tabnine to your IDE (free)

How to use
PropertyKey
in
de.smartics.properties.api.core.domain

Best Java code snippets using de.smartics.properties.api.core.domain.PropertyKey (Showing top 20 results out of 315)

origin: de.smartics.properties/smartics-properties-config

@Override
public final void addPropertyChangeListener(final PropertyKey name,
  final PropertyChangeListener listener) throws NullPointerException
{
 support.addPropertyChangeListener(name.toString(), listener);
}
origin: de.smartics.properties/smartics-properties-core

@Override
public PropertyKey getKey()
{
 return new PropertyKey("n/a");
}
origin: de.smartics.properties/smartics-properties-core

/**
 * Creates an instance for the given qualified name.
 * <p>
 * The qualified name consists of two part that are separated by a 'at' (
 * <code>@</code>) sign. The first part is the name of the property set, the
 * second part the name of the property.
 * </p>
 * {@example my-set@my.property.name}
 * <p>
 * The last 'at' sign is significant for the separation. That is, the property
 * set name may contain any number of 'at' signs. An 'at' sign at the end of
 * the qualified name is ignored.
 * </p>
 *
 * @param qualifiedName a name optionally prefixed with a property set name
 *          separated by a 'at' (<code>@</code>) sign.
 * @return the created instance.
 */
public static PropertyKey create(final String qualifiedName)
{
 return create(qualifiedName, '@');
}
origin: de.smartics.properties/smartics-properties-report

/**
 * Returns the set of properties this property belongs to.
 *
 * @return the set of properties this property belongs to.
 */
public String getPropertySet()
{
 final String descriptorValue = descriptor.getKey().getPropertySet();
 if (StringUtils.isBlank(descriptorValue))
 {
  return sourceInfo.getElementTypeName();
 }
 return descriptorValue;
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Returns the hash code of the object.
 *
 * @return the hash code.
 * @see de.smartics.properties.api.config.domain.PropertyDefinition#hashCode()
 */
@Override
public int hashCode()
{
 return descriptor.getKey().hashCode();
}
origin: de.smartics.properties/smartics-properties-config

private static boolean isResolvementFailureOfPlaceholder(
  final PropertyValueResolveException e, final Property property)
{
 return !property.getName().equals(e.getPropertyKey().getName());
}
origin: de.smartics.properties/smartics-properties-config

/**
 * Returns <code>true</code> if the given object is semantically equal to the
 * given object, <code>false</code> otherwise.
 * <p>
 * It is assumed that a descriptor with its key is unique. Therefore two
 * definitions are equal, if their descriptor keys are equal, they share the
 * same value and source location of the value.
 * </p>
 *
 * @param object object the instance to compare to.
 * @return <code>true</code> if the given object is semantically equal to the
 *         given object, <code>false</code> otherwise.
 */
@Override
public boolean equals(final Object object)
{
 if (this == object)
 {
  return true;
 }
 else if (object == null || getClass() != object.getClass())
 {
  return false;
 }
 final PropertyDefinition other = (PropertyDefinition) object;
 return (descriptor.getKey().equals(other.descriptor.getKey())
     && ObjectUtils.equals(property.getValue(),
       other.property.getValue()) && ObjectUtils.equals(
   property.getSource(), other.property.getSource()));
}
origin: de.smartics.properties/smartics-properties-core

 final PropertyDescriptor descriptor, final Locale locale)
final String target = descriptor.getKey().getPropertySet();
origin: de.smartics.properties/smartics-properties-config

@Override
public final void removePropertyChangeListener(final PropertyKey name,
  final PropertyChangeListener listener) throws NullPointerException
{
 support.removePropertyChangeListener(name.toString(), listener);
}
origin: de.smartics.properties/smartics-properties-core

private static DocumentName calculateDocumentName(final PropertyKey key,
  final Method propertyMethod)
{
 final Document annotation = propertyMethod.getAnnotation(Document.class);
 String name = propertyMethod.getName();
 if (annotation != null)
 {
  final String value = annotation.name();
  if (value != null)
  {
   final AnnotationHelper helper = new AnnotationHelper();
   final String annName = helper.normalizeString(value);
   if (StringUtils.isNotBlank(annName)) // NOPMD
   {
    name = annName;
   }
  }
 }
 final String setName = key.getPropertySet();
 final String fqn = setName != null ? setName + '.' + name : name;
 final DocumentName documentName = new DocumentName(fqn);
 return documentName;
}
origin: de.smartics.properties/smartics-properties-core

/**
 * Creates an instance for the given set and name.
 *
 * @param propertySet the name of the set the property belongs to.
 * @param name the name of the property.
 * @return the created instance.
 * @throws IllegalArgumentException if {@code propertySet} is blank but not
 *           <code>null</code> or if {@code name} is blank.
 */
public static PropertyKey create(final String propertySet, final String name)
 throws IllegalArgumentException
{
 return new PropertyKey(propertySet, name);
}
origin: de.smartics.properties/smartics-properties-core

/**
 * Reads the property key information from the method.
 *
 * @param method the method to read the property key.
 * @return the property key provided by this method.
 */
public PropertyKey readKey(final Method method)
{
 final String set = readPropertySetName(method);
 final String name = readPropertyKeyName(method);
 return PropertyKey.create(set, name);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final PropertyDescriptor getDescriptor(final PropertyKey key)
 throws UnknownPropertyException
{
 return getDescriptor(key.toString());
}
origin: de.smartics.properties/smartics-properties-core

/**
 * Creates an instance for the given qualified name.
 *
 * @param qualifiedName a name optionally prefixed with a property set name
 *          separated by the last occurrence (excluding the very end) of the
 *          {@code separator}.
 * @param separator the separator to use if for some reason the default is not
 *          appropriate.
 * @return the created instance.
 * @throws BlankArgumentException if {@code qualifiedName} is blank.
 */
public static PropertyKey create(final String qualifiedName,
  final char separator) throws BlankArgumentException
{
 Arg.checkNotBlank("qualifiedName", qualifiedName);
 final int dotIndex = qualifiedName.lastIndexOf(separator);
 if (dotIndex > 0 && dotIndex < qualifiedName.length() - 1)
 {
  final String propertySetName = qualifiedName.substring(0, dotIndex);
  final String name = qualifiedName.substring(dotIndex + 1);
  return new PropertyKey(propertySetName, name);
 }
 else
 {
  return new PropertyKey(null, qualifiedName);
 }
}
origin: de.smartics.properties/smartics-properties-config

private void checkValidPair(final PropertyDescriptor descriptor,
  final Property property) throws IllegalArgumentException
{
 final String name = property.getName();
 final String descriptorName = descriptor.getKey().toString();
 if (!name.equals(descriptorName))
 {
  throw new IllegalArgumentException("Property value with key '" + name
                    + "' does not match the key '"
                    + descriptorName
                    + "' in the property descriptor.");
 }
}
origin: de.smartics.properties/smartics-properties-config

private static boolean isResolvementFailureOfPlaceholder(
  final PropertyValueResolveException e, final Property property)
{
 return !property.getName().equals(e.getPropertyKey().toString());
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final DescribedProperty getProperty(final PropertyKey key)
 throws IllegalArgumentException, UnknownPropertyException
{
 final PropertyDescriptor descriptor = getPropertyDescriptor(key.toString());
 return getProperty(descriptor);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final ValidatedProperty getValidatedProperty(final PropertyKey key,
  final Object defaultValue) throws IllegalArgumentException,
 UnknownPropertyException, PropertyValidationException
{
 final PropertyDescriptor descriptor = getDescriptor(key.toString());
 return getValidatedProperty(descriptor, defaultValue);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final ValidatedProperty getValidatedProperty(final PropertyKey key,
  final Object defaultValue) throws IllegalArgumentException,
 UnknownPropertyException, PropertyValidationException, SecurityException
{
 final PropertyDescriptor descriptor = getPropertyDescriptor(key.toString());
 return getValidatedProperty(descriptor, defaultValue);
}
origin: de.smartics.properties/smartics-properties-config

@Override
public final Object getPropertyValue(final PropertyKey key)
 throws IllegalArgumentException, UnknownPropertyException,
 PropertyValidationException
{
 final PropertyDescriptor descriptor = getDescriptor(key.toString());
 return getPropertyValue(descriptor);
}
de.smartics.properties.api.core.domainPropertyKey

Javadoc

Defines a property key information. A property key uniquely identifies a property. It contains a name that is scoped by the name of the property set. That is, the name is only unique within its property set. To create the fully qualified property key, call #toString().

Most used methods

  • toString
    Returns the string representation of the object.
  • getPropertySet
    Returns the name of the set the property belongs to. This is the scope within the #getName() is uniq
  • <init>
    Default constructor.
  • create
    Creates an instance for the given set and name.
  • equals
  • getName
    Returns the name of the property. This value must not be null.
  • hashCode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now