Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2014 Daniel Bechler
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package de.danielbechler.diff.inclusion;
 
 
 
 import static de.danielbechler.diff.inclusion.Inclusion.DEFAULT;
 import static de.danielbechler.diff.inclusion.Inclusion.EXCLUDED;
 import static de.danielbechler.diff.inclusion.Inclusion.INCLUDED;
 
 @SuppressWarnings("OverlyComplexAnonymousInnerClass")
 {
 
 	public InclusionService(final CategoryResolver categoryResolverfinal ObjectDifferBuilder rootConfiguration)
 	{
 		Assert.notNull(rootConfiguration"rootConfiguration");
 		Assert.notNull(categoryResolver"categoryResolver");
 		this. = rootConfiguration;
 		this. = categoryResolver;
 	}
 
 	{
 	}
 
 	{
 	}
 
 	public boolean isIgnored(final DiffNode node)
 	{
 		if (node.isRootNode())
 		{
 			return false;
 		}
 		boolean strictIncludeModeEnabled = false;
 		boolean isExplicitlyIncluded = false;
 		for (final InclusionResolver inclusionResolver : )
 		{
 			if (inclusionResolver.enablesStrictIncludeMode())
 			{
 				strictIncludeModeEnabled = true;
 			}
 			switch (getInclusion(nodeinclusionResolver))
 			{
 				case :
 					return true;
 				case :
 					isExplicitlyIncluded = true;
 					break;
 			}
 		}
 		if (strictIncludeModeEnabled && !isExplicitlyIncluded)
 		{
 			return true;
 		}
 		return false;
 	}
 
 	private static Inclusion getInclusion(final DiffNode nodefinal InclusionResolver inclusionResolver)
 	{
 		final Inclusion inclusion = inclusionResolver.getInclusion(node);
 		return inclusion != null ? inclusion : ;
 	}
 
 	public ToInclude include()
	{
		return new ToInclude()
		{
			public ToInclude category(final String category)
			{
				return this;
			}
			public ToInclude type(final Class<?> type)
			{
				return this;
			}
			public ToInclude node(final NodePath nodePath)
			{
				return this;
			}
			public ToInclude propertyName(final String propertyName)
			{
				return this;
			}
			public ToInclude propertyNameOfType(final Class<?> typefinal String... propertyNames)
			{
				return this;
			}
			{
				return InclusionService.this;
			}
			{
			}
		};
	}
	void setCategoryInclusion(final Inclusion inclusionfinal String category)
	{
		{
		}
	}
	void setTypeInclusion(final Inclusion inclusionfinal Class<?> type)
	{
		if ( == null)
		{
		}
	}
	void setNodePathInclusion(final Inclusion inclusionfinal NodePath nodePath)
	{
		{
		}
	}
	void setPropertyNameInclusion(final Inclusion inclusionfinal String propertyName)
	{
		{
		}
	}
	private void setPropertyNameOfTypeInclusion(final Inclusion inclusionfinal Class<?> typefinal String... propertyNames)
	{
		Assert.notNull(type"type");
		for (final String propertyName : propertyNames)
		{
			Assert.hasText(propertyName"propertyName in propertyNames");
			{
			}
			.setInclusion(typepropertyNameinclusion);
		}
	}
	{
	}
	{
		return new TypeInclusionResolver();
	}
	{
	}
	{
	}
	{
	}
	public ToExclude exclude()
	{
		return new ToExclude()
		{
			public ToExclude category(final String category)
			{
				return this;
			}
			public ToExclude type(final Class<?> type)
			{
				return this;
			}
			public ToExclude node(final NodePath nodePath)
			{
				return this;
			}
			public ToExclude propertyName(final String propertyName)
			{
				return this;
			}
			public ToExclude propertyNameOfType(final Class<?> typefinal String... propertyNames)
			{
				return this;
			}
			{
				return InclusionService.this;
			}
			{
			}
		};
	}
	public InclusionConfigurer resolveUsing(final InclusionResolver inclusionResolver)
	{
		Assert.notNull(inclusionResolver"inclusionResolver");
		.add(inclusionResolver);
		return this;
	}
	{
	}
New to GrepCode? Check out our FAQ X