Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reformatting code.
  • Loading branch information
jwcarman committed Jul 30, 2014
1 parent 6e3dfa1 commit 4883df0
Show file tree
Hide file tree
Showing 227 changed files with 1,347 additions and 2,334 deletions.
3 changes: 2 additions & 1 deletion annotations/pom.xml
Expand Up @@ -14,7 +14,8 @@
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wicketopia</groupId>
Expand Down
Expand Up @@ -28,7 +28,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Disabled
{
public @interface Disabled {
String[] value() default Context.ALL;
}
Expand Up @@ -28,8 +28,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Enabled
{
public @interface Enabled {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,8 +26,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface DisplayName
{
public @interface DisplayName {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,8 +26,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface EditorType
{
public @interface EditorType {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -29,6 +29,5 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Ignored
{
public @interface Ignored {
}
Expand Up @@ -26,8 +26,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Order
{
public @interface Order {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,8 +26,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface ViewerType
{
public @interface ViewerType {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -28,8 +28,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Optional
{
public @interface Optional {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,9 +26,8 @@
/**
* @since 1.0
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Required
{
public @interface Required {
String[] value() default Context.ALL;
}
Expand Up @@ -24,8 +24,7 @@
/**
* @author James Carman
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface CreditCard
{
public @interface CreditCard {
}
Expand Up @@ -24,14 +24,14 @@
/**
* @author James Carman
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface DoubleRange
{
public @interface DoubleRange {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

double max() default Double.MAX_VALUE;

double min() default Double.MIN_VALUE;
}
Expand Up @@ -24,8 +24,7 @@
/**
* @author James Carman
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Email
{
public @interface Email {
}
Expand Up @@ -24,14 +24,14 @@
/**
* @author James Carman
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Length
{
public @interface Length {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

int max() default Integer.MAX_VALUE;

int min() default Integer.MIN_VALUE;
}
Expand Up @@ -24,14 +24,14 @@
/**
* @author James Carman
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface LongRange
{
public @interface LongRange {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

long max() default Long.MAX_VALUE;

long min() default Long.MIN_VALUE;
}
Expand Up @@ -21,10 +21,9 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Pattern
{
public @interface Pattern {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -28,8 +28,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Hidden
{
public @interface Hidden {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
Expand Up @@ -26,10 +26,9 @@
/**
* @since 1.0
*/
@Retention( RetentionPolicy.RUNTIME )
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface Visible
{
public @interface Visible {
//----------------------------------------------------------------------------------------------------------------------
// Other Methods
//----------------------------------------------------------------------------------------------------------------------
Expand Down
42 changes: 14 additions & 28 deletions annotations/src/main/java/org/wicketopia/context/Context.java
Expand Up @@ -21,8 +21,7 @@
/**
*
*/
public class Context implements Serializable
{
public class Context implements Serializable {
//----------------------------------------------------------------------------------------------------------------------
// Fields
//----------------------------------------------------------------------------------------------------------------------
Expand All @@ -43,65 +42,52 @@ public class Context implements Serializable
// Static Methods
//----------------------------------------------------------------------------------------------------------------------

public static ContextPredicate whereContextNameIn(String... contextNames)
{
public static ContextPredicate whereContextNameIn(String... contextNames) {
return new ContextNamePredicate(contextNames);
}

//----------------------------------------------------------------------------------------------------------------------
// Constructors
//----------------------------------------------------------------------------------------------------------------------

public Context(String name)
{
public Context(String name) {
this.name = name;
}

//----------------------------------------------------------------------------------------------------------------------
// Getter/Setter Methods
//----------------------------------------------------------------------------------------------------------------------

public String getName()
{
public String getName() {
return name;
}

//----------------------------------------------------------------------------------------------------------------------
// Inner Classes
//----------------------------------------------------------------------------------------------------------------------

private static final class AllContextsPredicate implements ContextPredicate
{
private static final class AllContextsPredicate implements ContextPredicate {
@Override
public boolean evaluate(Context context)
{
public boolean evaluate(Context context) {
return true;
}
}

private static final class ContextNamePredicate implements ContextPredicate
{

private static final class ContextNamePredicate implements ContextPredicate {
private final String[] contextNames;

private ContextNamePredicate(String... contextNames)
{
private ContextNamePredicate(String... contextNames) {
this.contextNames = contextNames;
}

@Override
public boolean evaluate(Context context)
{
if (contextNames == null || contextNames.length == 0)
{
public boolean evaluate(Context context) {
if (contextNames == null || contextNames.length == 0) {
return true;
}
else
{
} else {
final String target = context.getName();
for (String contextName : contextNames)
{
if (ALL.equals(contextName) || target.equals(contextName))
{
for (String contextName : contextNames) {
if (ALL.equals(contextName) || target.equals(contextName)) {
return true;
}
}
Expand Down
Expand Up @@ -21,7 +21,6 @@
/**
* @since 1.0
*/
public interface ContextPredicate extends Serializable
{
public interface ContextPredicate extends Serializable {
boolean evaluate(Context context);
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DisabledForRole
{
public @interface DisabledForRole {
String[] value();
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface EnabledForRole
{
public @interface EnabledForRole {
String[] value();
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface HiddenForRole
{
public @interface HiddenForRole {
String[] value();
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface OptionalForRole
{
public @interface OptionalForRole {
String[] value();
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RequiredForRole
{
public @interface RequiredForRole {
String[] value();
}
Expand Up @@ -26,7 +26,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface VisibleForRole
{
public @interface VisibleForRole {
String[] value();
}
3 changes: 2 additions & 1 deletion domdrides/pom.xml
Expand Up @@ -15,7 +15,8 @@
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wicketopia</groupId>
Expand Down

0 comments on commit 4883df0

Please sign in to comment.