You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by hc...@apache.org on 2005/01/27 11:48:52 UTC
cvs commit: jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation CopyRightApache.java CopyRightType.java Implements.java JavaBean.java NonNullable.java TestOnly.java ThreadSafety.java ThreadSafetyType.java TODO.java UnsupportedOperation.java
hchar 2005/01/27 02:48:52
Added: sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation
CopyRightApache.java CopyRightType.java
Implements.java JavaBean.java NonNullable.java
TestOnly.java ThreadSafety.java
ThreadSafetyType.java TODO.java
UnsupportedOperation.java
Log:
moved from package *.yacache.annotate
Revision Changes Path
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/CopyRightApache.java
Index: CopyRightApache.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Annotates the Apache Copyright.
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface CopyRightApache {
CopyRightType value() default CopyRightType.APACHE;
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/CopyRightType.java
Index: CopyRightType.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
/**
* Copyright Types.
*
* @author Hanson Char
*/
// @CopyRightApache
// http://www.netbeans.org/issues/show_bug.cgi?id=53704
public enum CopyRightType {
APACHE {
@Override public String toString() {
return "\n"
+ "/* ========================================================================\n"
+ " * Copyright 2001-2004 The Apache Software Foundation\n"
+ " *\n"
+ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
+ " * you may not use this file except in compliance with the License.\n"
+ " * You may obtain a copy of the License at\n"
+ " *\n"
+ " * http://www.apache.org/licenses/LICENSE-2.0\n"
+ " *\n"
+ " * Unless required by applicable law or agreed to in writing, software\n"
+ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
+ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+ " * See the License for the specific language governing permissions and\n"
+ " * limitations under the License.\n"
+ " * ========================================================================\n"
+ " */\n"
;
}
};
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/Implements.java
Index: Implements.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
/**
* Implements the specified interface.
*
* @author Hanson Char
*/
public @interface Implements {
/** Interface being implemented. */
public Class value();
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/JavaBean.java
Index: JavaBean.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
/**
*
* @author Hanson Char
*/
public @interface JavaBean {
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/NonNullable.java
Index: NonNullable.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Element so annotated is never expected to be null.
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Inherited
@Retention(RetentionPolicy.SOURCE)
@Target({
ElementType.METHOD, // return value of a method is never null
ElementType.FIELD, // field is never null
ElementType.LOCAL_VARIABLE, // variable is never null
ElementType.PARAMETER // parameter is never null
})
public @interface NonNullable {
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/TestOnly.java
Index: TestOnly.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Annotates the target is for testing purposes only.
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
public @interface TestOnly {
String value() default "";
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/ThreadSafety.java
Index: ThreadSafety.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Characterizing thread safety.
*
* http://www-106.ibm.com/developerworks/java/library/j-jtp09263.html
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface ThreadSafety {
ThreadSafetyType value();
String caveat() default "";
String note() default "";
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/ThreadSafetyType.java
Index: ThreadSafetyType.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
/**
* Thread Safety Types.
*
* http://www-106.ibm.com/developerworks/java/library/j-jtp09263.html
*
* @author Hanson Char
*/
// @CopyRightApache
// http://www.netbeans.org/issues/show_bug.cgi?id=53704
public enum ThreadSafetyType {
/** Immutable objects are guaranteed to be thread-safe. */
IMMUTABLE,
SAFE,
/**
* Conditionally thread-safe classes are those for which each individual
* operation may be thread-safe, but certain sequences of operations may
* require external synchronization. The most common example of
* conditional thread safety is traversing an iterator returned from
* Hashtable or Vector -- the fail-fast iterators returned by these
* classes assume that the underlying collection will not be mutated
* while the iterator traversal is in progress. To ensure that other
* threads will not mutate the collection during traversal, the
* iterating thread should be sure that it has exclusive access to
* the collection for the entirety of the traversal. Typically,
* exclusive access is ensured by synchronizing on a lock -- and the
* class's documentation should specify which lock that is
* (typically the object's intrinsic monitor).
*/
CONDITIONAL,
/**
* Thread-compatible classes are not thread-safe, but can be used
* safely in concurrent environments by using synchronization
* appropriately.
*/
COMPATIBLE,
/**
* Thread-hostile classes are those that cannot be rendered safe to
* use concurrently, regardless of what external synchronization is
* invoked.
*/
HOSTILE
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/TODO.java
Index: TODO.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Annotates what needs to be done.
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Retention(RetentionPolicy.SOURCE)
public @interface TODO {
/** Summary of what needs to be done. */
String value() default "";
/** Details of what needs to be done. */
String details() default "";
}
1.1 jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/annotation/UnsupportedOperation.java
Index: UnsupportedOperation.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* 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 org.apache.jcs.yajcache.lang.annotation;
import java.lang.annotation.*;
/**
* Unsupported Operation.
*
* @author Hanson Char
*/
@CopyRightApache
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface UnsupportedOperation {
String value() default "";
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org