de.smartics.properties.api.core.domain
Class SourceInfo

Package class diagram package SourceInfo
java.lang.Object
  extended by de.smartics.properties.api.core.domain.SourceInfo

public final class SourceInfo
     
     
extends Object

Contains information about the source the property is defined in.


Field Summary
static SourceInfo EMPTY
          Reference to the empty source information.
 
Constructor Summary
SourceInfo(String elementTypeName, String elementName, int lineNumber)
          Default constructor.
SourceInfo(String elementTypeName, String elementName, String lineNumber)
          Convenience constructor to parse the line number.
 
Method Summary
 String getElementId()
          Returns the element identifier that consists of the type and the element name.
 String getElementName()
          Returns the name of the element that defines the property.
 String getElementTypeName()
          Returns the name of the element's type.
 int getLineNumber()
          Returns the line number where the definition of the property begins.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final SourceInfo EMPTY
Reference to the empty source information.

Constructor Detail

SourceInfo

public SourceInfo(String elementTypeName,
                  String elementName,
                  int lineNumber)
           throws de.smartics.util.lang.BlankArgumentException
Default constructor.

Parameters:
elementTypeName - the name of the element's type.
elementName - the name of the element that defines the property.
lineNumber - the line number where the definition of the property begins.
Throws:
de.smartics.util.lang.BlankArgumentException - if either elementTypeName or elementName is blank.

SourceInfo

public SourceInfo(String elementTypeName,
                  String elementName,
                  String lineNumber)
           throws de.smartics.util.lang.BlankArgumentException
Convenience constructor to parse the line number.

Parameters:
elementTypeName - the name of the element's type.
elementName - the name of the element that defines the property.
lineNumber - the line number where the definition of the property begins. If this cannot be parsed as an integer number, the value is set to -1.
Throws:
de.smartics.util.lang.BlankArgumentException - if either elementTypeName or elementName is blank.
Method Detail

getElementTypeName

public String getElementTypeName()
Returns the name of the element's type.

Returns:
the name of the element's type.

getElementName

public String getElementName()
Returns the name of the element that defines the property.

Returns:
the name of the element that defines the property.

getLineNumber

public int getLineNumber()
Returns the line number where the definition of the property begins.

Returns:
the line number where the definition of the property begins.

getElementId

public String getElementId()
Returns the element identifier that consists of the type and the element name.

Returns:
the unique identifier of the declaring element.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.