| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 4 | 2 | 3 | 0.980 | class_member_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 4 | 63 | src/NHibernate/Properties/FieldAccessor.cs |
| 2 | 4 | 83 | src/NHibernate/Properties/FieldAccessor.cs |
| ||||
#region IPropertyAccessor Members
/// <summary>
/// Create a <see cref="FieldGetter"/> to <c>get</c> the value of the mapped Property
/// through a <c>Field</c>.
/// </summary>
/// <param name="theClass">The <see cref="System.Type"/> to find the Property in.</param>
/// <param name="propertyName">The name of the mapped Property to get.</param>
/// <returns>
/// The <see cref="FieldGetter"/> to use to get the value of the Property from an
/// instance of the <see cref="System.Type"/>.</returns>
/// <exception cref="PropertyNotFoundException" >
/// Thrown when a Field specified by the <c>propertyName</c> could not
/// be found in the <see cref="System.Type"/>.
/// </exception>
public IGetter GetGetter(System.Type theClass, string propertyName)
{
string fieldName = GetFieldName(propertyName);
return new FieldGetter(GetField(theClass, fieldName), theClass, fieldName);
}
|
| ||||
/// <summary>
/// Create a <see cref="FieldSetter"/> to <c>set</c> the value of the mapped Property
/// through a <c>Field</c>.
/// </summary>
/// <param name="theClass">The <see cref="System.Type"/> to find the mapped Property in.</param>
/// <param name="propertyName">The name of the mapped Property to set.</param>
/// <returns>
/// The <see cref="FieldSetter"/> to use to set the value of the Property on an
/// instance of the <see cref="System.Type"/>.
/// </returns>
/// <exception cref="PropertyNotFoundException" >
/// Thrown when a Field for the Property specified by the <c>propertyName</c> using the
/// <see cref="IFieldNamingStrategy"/> could not be found in the <see cref="System.Type"/>.
/// </exception>
public ISetter GetSetter(System.Type theClass, string propertyName)
{
string fieldName = GetFieldName(propertyName);
return new FieldSetter(GetField(theClass, fieldName), theClass, fieldName);
}
|
| |||
#region IPropertyAccessor Members
/// <summary>
/// Create a <see cref="FieldGetter"/> to <c>get</c> the value of the mapped Property
/// Create a <see cref="FieldSetter"/> to <c>set</c> the value of the mapped Property
/// through a <c>Field</c>.
/// </summary>
/// <param name="theClass">The <see cref="System.Type"/> to find the Property in.</param>
/// <param name="propertyName">The name of the mapped Property to get.</param>
/// <param name="theClass">The <see cref="System.Type"/> to find the mapped Property in.</param>
/// <param name="propertyName">The name of the mapped Property to set.</param>
/// <returns>
/// The <see cref="FieldGetter"/> to use to get the value of the Property from an
/// instance of the <see cref="System.Type"/>.</returns>
/// The <see cref="FieldSetter"/> to use to set the value of the Property on an
/// instance of the <see cref="System.Type"/>.
/// </returns>
/// <exception cref="PropertyNotFoundException" >
/// Thrown when a Field specified by the <c>propertyName</c> could not
/// be found in the <see cref="System.Type"/>.
/// Thrown when a Field for the Property specified by the <c>propertyName</c> using the
/// <see cref="IFieldNamingStrategy"/> could not be found in the <see cref="System.Type"/>.
/// </exception>
public [[#variable28f096c0]] [[#variable286492c0]](System.Type theClass, string propertyName)
{
string fieldName = GetFieldName(propertyName);
return new [[#variable28649260]](GetField(theClass, fieldName), theClass, fieldName);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#28f096c0]] | IGetter |
| 1 | 2 | [[#28f096c0]] | ISetter |
| 2 | 1 | [[#286492c0]] | GetGetter |
| 2 | 2 | [[#286492c0]] | GetSetter |
| 3 | 1 | [[#28649260]] | FieldGetter |
| 3 | 2 | [[#28649260]] | FieldSetter |